obshare-cli 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 SuShuHeng
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,191 @@
1
+ Metadata-Version: 2.4
2
+ Name: obshare-cli
3
+ Version: 0.1.0
4
+ Summary: CLI tool for uploading Obsidian Markdown documents to Feishu cloud documents
5
+ Home-page: https://github.com/SuShuHeng/obshare-cli
6
+ Author: SuShuHeng
7
+ Author-email: SuShuHeng <code.sushuheng@gmail.com>
8
+ License: MIT
9
+ Project-URL: Homepage, https://github.com/SuShuHeng/obshare-cli
10
+ Project-URL: Bug Tracker, https://github.com/SuShuHeng/obshare-cli/issues
11
+ Project-URL: Source Code, https://github.com/SuShuHeng/obshare-cli
12
+ Project-URL: Documentation, https://github.com/SuShuHeng/obshare-cli#readme
13
+ Keywords: feishu,markdown,obsidian,cli,upload,document
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Topic :: Office/Business
25
+ Classifier: Topic :: Text Processing :: Markup :: Markdown
26
+ Classifier: Topic :: Utilities
27
+ Requires-Python: >=3.8
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+ Requires-Dist: click>=8.0.0
31
+ Requires-Dist: requests>=2.28.0
32
+ Requires-Dist: cryptography>=3.4.0
33
+ Requires-Dist: python-dotenv>=0.19.0
34
+ Requires-Dist: pyyaml>=6.0
35
+ Requires-Dist: pillow>=9.0.0
36
+ Provides-Extra: dev
37
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
38
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
39
+ Requires-Dist: black>=23.0.0; extra == "dev"
40
+ Requires-Dist: flake8>=6.0.0; extra == "dev"
41
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
42
+ Dynamic: author
43
+ Dynamic: home-page
44
+ Dynamic: license-file
45
+ Dynamic: requires-python
46
+
47
+ # obshare-cli
48
+
49
+ A command-line interface tool for uploading Obsidian Markdown documents to Feishu cloud documents.
50
+
51
+ [![PyPI version](https://badge.fury.io/py/obshare-cli.svg)](https://badge.fury.io/py/obshare-cli)
52
+ [![Python](https://img.shields.io/pypi/pyversions/obshare-cli.svg)](https://pypi.org/project/obshare-cli/)
53
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
54
+
55
+ ## Installation
56
+
57
+ ```bash
58
+ pip install obshare-cli
59
+ ```
60
+
61
+ ### Optional: Mermaid Support
62
+
63
+ For Mermaid diagram rendering, install Puppeteer:
64
+
65
+ ```bash
66
+ npm install -g puppeteer
67
+ ```
68
+
69
+ ## Configuration
70
+
71
+ First, configure your Feishu credentials:
72
+
73
+ ```bash
74
+ # Set App ID
75
+ obshare-cli config set-app-id "cli_xxx"
76
+
77
+ # Set App Secret
78
+ obshare-cli config set-app-secret "xxx"
79
+
80
+ # Set User ID
81
+ obshare-cli config set-user-id "xxx"
82
+
83
+ # Set Folder Token
84
+ obshare-cli config set-folder "fldcnxxx"
85
+
86
+ # Show current configuration
87
+ obshare-cli config show
88
+
89
+ # Test connection
90
+ obshare-cli config test
91
+ ```
92
+
93
+ ## Usage
94
+
95
+ ### Upload a Document
96
+
97
+ ```bash
98
+ # Basic upload
99
+ obshare-cli upload document.md
100
+
101
+ # Upload with JSON output (for AI agents)
102
+ obshare-cli upload document.md --json
103
+
104
+ # Upload with permissions
105
+ obshare-cli upload document.md --public --allow-copy --allow-download
106
+ ```
107
+
108
+ ### View Upload History
109
+
110
+ ```bash
111
+ obshare-cli list history
112
+ obshare-cli list history --json
113
+ ```
114
+
115
+ ### Set Document Permissions
116
+
117
+ ```bash
118
+ obshare-cli permission set <token> --public --allow-copy --allow-download
119
+ ```
120
+
121
+ ### Delete a Document
122
+
123
+ ```bash
124
+ obshare-cli delete <token>
125
+ ```
126
+
127
+ ## JSON Output Example
128
+
129
+ ```json
130
+ {
131
+ "success": true,
132
+ "document": {
133
+ "title": "My Note",
134
+ "token": "doxcnAbcDefGhi",
135
+ "url": "https://feishu.cn/docx/doxcnAbcDefGhi"
136
+ },
137
+ "permissions": {
138
+ "isPublic": false,
139
+ "allowCopy": false,
140
+ "allowCreateCopy": false
141
+ },
142
+ "uploadTime": "2024-01-15T10:30:00Z"
143
+ }
144
+ ```
145
+
146
+ ## Features
147
+
148
+ - Upload Markdown documents to Feishu
149
+ - Support for YAML frontmatter
150
+ - Support for Obsidian Callouts
151
+ - Support for Mermaid diagrams (converted to images)
152
+ - Support for embedded images (Obsidian `![[image.png]]` and Markdown `![](image.png)`)
153
+ - Configurable document permissions
154
+ - Upload history tracking
155
+ - JSON output mode for AI/CLI integration
156
+
157
+ ## Requirements
158
+
159
+ - Python 3.8+
160
+ - Node.js >= 16 (optional, for Mermaid rendering)
161
+
162
+ ## Development
163
+
164
+ ```bash
165
+ # Clone the repository
166
+ git clone https://github.com/SuShuHeng/obshare-cli.git
167
+ cd obshare-cli
168
+
169
+ # Install in development mode
170
+ pip install -e ".[dev]"
171
+
172
+ # Run tests
173
+ pytest
174
+
175
+ # Build package
176
+ python -m build
177
+ ```
178
+
179
+ ## License
180
+
181
+ MIT License - see [LICENSE](LICENSE) for details.
182
+
183
+ ## Author
184
+
185
+ SuShuHeng (code.sushuheng@gmail.com)
186
+
187
+ ## Links
188
+
189
+ - [GitHub Repository](https://github.com/SuShuHeng/obshare-cli)
190
+ - [PyPI Package](https://pypi.org/project/obshare-cli/)
191
+ - [Issue Tracker](https://github.com/SuShuHeng/obshare-cli/issues)
@@ -0,0 +1,145 @@
1
+ # obshare-cli
2
+
3
+ A command-line interface tool for uploading Obsidian Markdown documents to Feishu cloud documents.
4
+
5
+ [![PyPI version](https://badge.fury.io/py/obshare-cli.svg)](https://badge.fury.io/py/obshare-cli)
6
+ [![Python](https://img.shields.io/pypi/pyversions/obshare-cli.svg)](https://pypi.org/project/obshare-cli/)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ pip install obshare-cli
13
+ ```
14
+
15
+ ### Optional: Mermaid Support
16
+
17
+ For Mermaid diagram rendering, install Puppeteer:
18
+
19
+ ```bash
20
+ npm install -g puppeteer
21
+ ```
22
+
23
+ ## Configuration
24
+
25
+ First, configure your Feishu credentials:
26
+
27
+ ```bash
28
+ # Set App ID
29
+ obshare-cli config set-app-id "cli_xxx"
30
+
31
+ # Set App Secret
32
+ obshare-cli config set-app-secret "xxx"
33
+
34
+ # Set User ID
35
+ obshare-cli config set-user-id "xxx"
36
+
37
+ # Set Folder Token
38
+ obshare-cli config set-folder "fldcnxxx"
39
+
40
+ # Show current configuration
41
+ obshare-cli config show
42
+
43
+ # Test connection
44
+ obshare-cli config test
45
+ ```
46
+
47
+ ## Usage
48
+
49
+ ### Upload a Document
50
+
51
+ ```bash
52
+ # Basic upload
53
+ obshare-cli upload document.md
54
+
55
+ # Upload with JSON output (for AI agents)
56
+ obshare-cli upload document.md --json
57
+
58
+ # Upload with permissions
59
+ obshare-cli upload document.md --public --allow-copy --allow-download
60
+ ```
61
+
62
+ ### View Upload History
63
+
64
+ ```bash
65
+ obshare-cli list history
66
+ obshare-cli list history --json
67
+ ```
68
+
69
+ ### Set Document Permissions
70
+
71
+ ```bash
72
+ obshare-cli permission set <token> --public --allow-copy --allow-download
73
+ ```
74
+
75
+ ### Delete a Document
76
+
77
+ ```bash
78
+ obshare-cli delete <token>
79
+ ```
80
+
81
+ ## JSON Output Example
82
+
83
+ ```json
84
+ {
85
+ "success": true,
86
+ "document": {
87
+ "title": "My Note",
88
+ "token": "doxcnAbcDefGhi",
89
+ "url": "https://feishu.cn/docx/doxcnAbcDefGhi"
90
+ },
91
+ "permissions": {
92
+ "isPublic": false,
93
+ "allowCopy": false,
94
+ "allowCreateCopy": false
95
+ },
96
+ "uploadTime": "2024-01-15T10:30:00Z"
97
+ }
98
+ ```
99
+
100
+ ## Features
101
+
102
+ - Upload Markdown documents to Feishu
103
+ - Support for YAML frontmatter
104
+ - Support for Obsidian Callouts
105
+ - Support for Mermaid diagrams (converted to images)
106
+ - Support for embedded images (Obsidian `![[image.png]]` and Markdown `![](image.png)`)
107
+ - Configurable document permissions
108
+ - Upload history tracking
109
+ - JSON output mode for AI/CLI integration
110
+
111
+ ## Requirements
112
+
113
+ - Python 3.8+
114
+ - Node.js >= 16 (optional, for Mermaid rendering)
115
+
116
+ ## Development
117
+
118
+ ```bash
119
+ # Clone the repository
120
+ git clone https://github.com/SuShuHeng/obshare-cli.git
121
+ cd obshare-cli
122
+
123
+ # Install in development mode
124
+ pip install -e ".[dev]"
125
+
126
+ # Run tests
127
+ pytest
128
+
129
+ # Build package
130
+ python -m build
131
+ ```
132
+
133
+ ## License
134
+
135
+ MIT License - see [LICENSE](LICENSE) for details.
136
+
137
+ ## Author
138
+
139
+ SuShuHeng (code.sushuheng@gmail.com)
140
+
141
+ ## Links
142
+
143
+ - [GitHub Repository](https://github.com/SuShuHeng/obshare-cli)
144
+ - [PyPI Package](https://pypi.org/project/obshare-cli/)
145
+ - [Issue Tracker](https://github.com/SuShuHeng/obshare-cli/issues)
@@ -0,0 +1,59 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "obshare-cli"
7
+ version = "0.1.0"
8
+ authors = [
9
+ { name="SuShuHeng", email="code.sushuheng@gmail.com" }
10
+ ]
11
+ description = "CLI tool for uploading Obsidian Markdown documents to Feishu cloud documents"
12
+ readme = "README.md"
13
+ requires-python = ">=3.8"
14
+ license = {text = "MIT"}
15
+ classifiers = [
16
+ "Development Status :: 4 - Beta",
17
+ "Intended Audience :: Developers",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Operating System :: OS Independent",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.8",
22
+ "Programming Language :: Python :: 3.9",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ "Topic :: Office/Business",
27
+ "Topic :: Text Processing :: Markup :: Markdown",
28
+ "Topic :: Utilities",
29
+ ]
30
+ keywords = ["feishu", "markdown", "obsidian", "cli", "upload", "document"]
31
+ dependencies = [
32
+ "click>=8.0.0",
33
+ "requests>=2.28.0",
34
+ "cryptography>=3.4.0",
35
+ "python-dotenv>=0.19.0",
36
+ "pyyaml>=6.0",
37
+ "pillow>=9.0.0",
38
+ ]
39
+
40
+ [project.optional-dependencies]
41
+ dev = [
42
+ "pytest>=7.0.0",
43
+ "pytest-cov>=4.0.0",
44
+ "black>=23.0.0",
45
+ "flake8>=6.0.0",
46
+ "mypy>=1.0.0",
47
+ ]
48
+
49
+ [project.scripts]
50
+ obshare-cli = "obshare_cli.cli:main"
51
+
52
+ [project.urls]
53
+ Homepage = "https://github.com/SuShuHeng/obshare-cli"
54
+ "Bug Tracker" = "https://github.com/SuShuHeng/obshare-cli/issues"
55
+ "Source Code" = "https://github.com/SuShuHeng/obshare-cli"
56
+ Documentation = "https://github.com/SuShuHeng/obshare-cli#readme"
57
+
58
+ [tool.setuptools.packages.find]
59
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,66 @@
1
+ """
2
+ obshare-cli - Upload Obsidian Markdown documents to Feishu
3
+ """
4
+
5
+ from setuptools import setup, find_packages
6
+
7
+ with open("README.md", encoding="utf-8") as f:
8
+ long_description = f.read()
9
+
10
+ setup(
11
+ name="obshare-cli",
12
+ version="0.1.0",
13
+ author="SuShuHeng",
14
+ author_email="code.sushuheng@gmail.com",
15
+ description="CLI tool for uploading Obsidian Markdown documents to Feishu cloud documents",
16
+ long_description=long_description,
17
+ long_description_content_type="text/markdown",
18
+ url="https://github.com/SuShuHeng/obshare-cli",
19
+ project_urls={
20
+ "Bug Tracker": "https://github.com/SuShuHeng/obshare-cli/issues",
21
+ "Source Code": "https://github.com/SuShuHeng/obshare-cli",
22
+ "Documentation": "https://github.com/SuShuHeng/obshare-cli#readme",
23
+ },
24
+ package_dir={"": "src"},
25
+ packages=find_packages(where="src"),
26
+ classifiers=[
27
+ "Development Status :: 4 - Beta",
28
+ "Intended Audience :: Developers",
29
+ "License :: OSI Approved :: MIT License",
30
+ "Operating System :: OS Independent",
31
+ "Programming Language :: Python :: 3",
32
+ "Programming Language :: Python :: 3.8",
33
+ "Programming Language :: Python :: 3.9",
34
+ "Programming Language :: Python :: 3.10",
35
+ "Programming Language :: Python :: 3.11",
36
+ "Programming Language :: Python :: 3.12",
37
+ "Topic :: Office/Business",
38
+ "Topic :: Text Processing :: Markup :: Markdown",
39
+ "Topic :: Utilities",
40
+ ],
41
+ python_requires=">=3.8",
42
+ install_requires=[
43
+ "click>=8.0.0",
44
+ "requests>=2.28.0",
45
+ "cryptography>=3.4.0",
46
+ "python-dotenv>=0.19.0",
47
+ "pyyaml>=6.0",
48
+ "pillow>=9.0.0",
49
+ ],
50
+ extras_require={
51
+ "dev": [
52
+ "pytest>=7.0.0",
53
+ "pytest-cov>=4.0.0",
54
+ "black>=23.0.0",
55
+ "flake8>=6.0.0",
56
+ "mypy>=1.0.0",
57
+ ],
58
+ },
59
+ entry_points={
60
+ "console_scripts": [
61
+ "obshare-cli=obshare_cli.cli:main",
62
+ ],
63
+ },
64
+ keywords="feishu markdown obsidian cli upload document",
65
+ license="MIT",
66
+ )
@@ -0,0 +1,6 @@
1
+ """
2
+ ObShare CLI - Command-line interface for uploading Markdown documents to Feishu
3
+ """
4
+
5
+ __version__ = "0.1.0"
6
+ __author__ = "ObShare Team"