mdify-cli 0.2.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) 2026 Stranger
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,4 @@
1
+ include README.md
2
+ include LICENSE
3
+ include install.sh
4
+ include uninstall.sh
@@ -0,0 +1,199 @@
1
+ Metadata-Version: 2.4
2
+ Name: mdify-cli
3
+ Version: 0.2.0
4
+ Summary: Convert documents to Markdown using Docling
5
+ Author: tiroq
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/tiroq/mdify
8
+ Project-URL: Repository, https://github.com/tiroq/mdify
9
+ Project-URL: Issues, https://github.com/tiroq/mdify/issues
10
+ Keywords: markdown,conversion,pdf,docling,cli,document
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: End Users/Desktop
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Text Processing :: Markup :: Markdown
23
+ Classifier: Topic :: Utilities
24
+ Requires-Python: >=3.8
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: docling>=1.0.0
28
+ Dynamic: license-file
29
+
30
+ # mdify
31
+
32
+ Convert documents to Markdown using the Docling library.
33
+
34
+ ## Installation
35
+
36
+ ### One-line install (recommended)
37
+
38
+ ```bash
39
+ curl -sSL https://raw.githubusercontent.com/tiroq/mdify/main/install.sh | bash
40
+ ```
41
+
42
+ This will:
43
+ - Install mdify to `~/.mdify/`
44
+ - Create a virtual environment with all dependencies
45
+ - Add `mdify` command to your PATH
46
+
47
+ ### Install via pip
48
+
49
+ ```bash
50
+ pip install mdify
51
+ ```
52
+
53
+ Or with user install (no sudo required):
54
+
55
+ ```bash
56
+ pip install --user mdify
57
+ ```
58
+
59
+ ### Development install
60
+
61
+ ```bash
62
+ git clone https://github.com/tiroq/mdify.git
63
+ cd mdify
64
+ pip install -e .
65
+ ```
66
+
67
+ ## Usage
68
+
69
+ Convert a single file:
70
+ ```bash
71
+ mdify document.pdf
72
+ ```
73
+
74
+ Convert all files in a directory:
75
+ ```bash
76
+ mdify /path/to/documents --glob "*.pdf"
77
+ ```
78
+
79
+ Recursively convert files in a directory:
80
+ ```bash
81
+ mdify /path/to/documents --recursive --glob "*.pdf"
82
+ ```
83
+
84
+ ## Options
85
+
86
+ - `input`: Input file or directory to convert (required)
87
+ - `--out-dir DIR`: Output directory for converted files (default: output)
88
+ - `--glob PATTERN`: Glob pattern for filtering files in directory (default: *)
89
+ - `--recursive`: Recursively scan directories
90
+ - `--flat`: Disable directory structure preservation in output
91
+ - `--overwrite`: Overwrite existing output files
92
+ - `--quiet`: Suppress progress messages
93
+ - `--check-update`: Check for available updates and exit
94
+ - `--version`: Show version and exit
95
+
96
+ ### Flat Mode Behavior
97
+
98
+ When using `--flat`, all output files are placed directly in the output directory. To prevent name collisions when multiple input files have the same name (e.g., `dir1/file.pdf` and `dir2/file.pdf`), the directory path is incorporated into the filename:
99
+
100
+ - `docs/subdir1/file.pdf` → `output/subdir1_file.md`
101
+ - `docs/subdir2/file.pdf` → `output/subdir2_file.md`
102
+ - `docs/a/b/c/file.pdf` → `output/a_b_c_file.md`
103
+
104
+ ## Examples
105
+
106
+ Convert all PDFs in a directory recursively, preserving structure:
107
+ ```bash
108
+ mdify documents/ --recursive --glob "*.pdf" --out-dir markdown_output
109
+ ```
110
+
111
+ Convert all documents to a flat output directory:
112
+ ```bash
113
+ mdify documents/ --recursive --flat --out-dir all_docs
114
+ ```
115
+
116
+ Overwrite existing files:
117
+ ```bash
118
+ mdify documents/ --overwrite
119
+ ```
120
+
121
+ ## Updates
122
+
123
+ mdify automatically checks for updates once per day. When a new version is available, you'll be prompted to upgrade:
124
+
125
+ ```
126
+ ==================================================
127
+ A new version of mdify is available!
128
+ Current version: 0.1.0
129
+ Latest version: 0.2.0
130
+ ==================================================
131
+
132
+ Run upgrade now? [y/N]
133
+ ```
134
+
135
+ ### Manual upgrade
136
+
137
+ ```bash
138
+ ~/.mdify/install.sh --upgrade
139
+ ```
140
+
141
+ ### Check for updates manually
142
+
143
+ ```bash
144
+ mdify --check-update
145
+ ```
146
+
147
+ ### Disable update checks
148
+
149
+ To disable automatic update checks, set the environment variable:
150
+
151
+ ```bash
152
+ export MDIFY_NO_UPDATE_CHECK=1
153
+ ```
154
+
155
+ Or for a single run:
156
+
157
+ ```bash
158
+ MDIFY_NO_UPDATE_CHECK=1 mdify document.pdf
159
+ ```
160
+
161
+ ## Uninstall
162
+
163
+ ```bash
164
+ ~/.mdify/uninstall.sh
165
+ ```
166
+
167
+ Or if installed via pip:
168
+
169
+ ```bash
170
+ pip uninstall mdify
171
+ ```
172
+
173
+ ## Development
174
+
175
+ ### Building for PyPI
176
+
177
+ Install build tools:
178
+
179
+ ```bash
180
+ pip install --upgrade build twine
181
+ ```
182
+
183
+ Build the package:
184
+
185
+ ```bash
186
+ python -m build
187
+ ```
188
+
189
+ Test locally:
190
+
191
+ ```bash
192
+ pip install dist/mdify-*.whl
193
+ ```
194
+
195
+ See [PUBLISHING.md](PUBLISHING.md) for complete PyPI publishing instructions.
196
+
197
+ ## License
198
+
199
+ MIT
@@ -0,0 +1,170 @@
1
+ # mdify
2
+
3
+ Convert documents to Markdown using the Docling library.
4
+
5
+ ## Installation
6
+
7
+ ### One-line install (recommended)
8
+
9
+ ```bash
10
+ curl -sSL https://raw.githubusercontent.com/tiroq/mdify/main/install.sh | bash
11
+ ```
12
+
13
+ This will:
14
+ - Install mdify to `~/.mdify/`
15
+ - Create a virtual environment with all dependencies
16
+ - Add `mdify` command to your PATH
17
+
18
+ ### Install via pip
19
+
20
+ ```bash
21
+ pip install mdify
22
+ ```
23
+
24
+ Or with user install (no sudo required):
25
+
26
+ ```bash
27
+ pip install --user mdify
28
+ ```
29
+
30
+ ### Development install
31
+
32
+ ```bash
33
+ git clone https://github.com/tiroq/mdify.git
34
+ cd mdify
35
+ pip install -e .
36
+ ```
37
+
38
+ ## Usage
39
+
40
+ Convert a single file:
41
+ ```bash
42
+ mdify document.pdf
43
+ ```
44
+
45
+ Convert all files in a directory:
46
+ ```bash
47
+ mdify /path/to/documents --glob "*.pdf"
48
+ ```
49
+
50
+ Recursively convert files in a directory:
51
+ ```bash
52
+ mdify /path/to/documents --recursive --glob "*.pdf"
53
+ ```
54
+
55
+ ## Options
56
+
57
+ - `input`: Input file or directory to convert (required)
58
+ - `--out-dir DIR`: Output directory for converted files (default: output)
59
+ - `--glob PATTERN`: Glob pattern for filtering files in directory (default: *)
60
+ - `--recursive`: Recursively scan directories
61
+ - `--flat`: Disable directory structure preservation in output
62
+ - `--overwrite`: Overwrite existing output files
63
+ - `--quiet`: Suppress progress messages
64
+ - `--check-update`: Check for available updates and exit
65
+ - `--version`: Show version and exit
66
+
67
+ ### Flat Mode Behavior
68
+
69
+ When using `--flat`, all output files are placed directly in the output directory. To prevent name collisions when multiple input files have the same name (e.g., `dir1/file.pdf` and `dir2/file.pdf`), the directory path is incorporated into the filename:
70
+
71
+ - `docs/subdir1/file.pdf` → `output/subdir1_file.md`
72
+ - `docs/subdir2/file.pdf` → `output/subdir2_file.md`
73
+ - `docs/a/b/c/file.pdf` → `output/a_b_c_file.md`
74
+
75
+ ## Examples
76
+
77
+ Convert all PDFs in a directory recursively, preserving structure:
78
+ ```bash
79
+ mdify documents/ --recursive --glob "*.pdf" --out-dir markdown_output
80
+ ```
81
+
82
+ Convert all documents to a flat output directory:
83
+ ```bash
84
+ mdify documents/ --recursive --flat --out-dir all_docs
85
+ ```
86
+
87
+ Overwrite existing files:
88
+ ```bash
89
+ mdify documents/ --overwrite
90
+ ```
91
+
92
+ ## Updates
93
+
94
+ mdify automatically checks for updates once per day. When a new version is available, you'll be prompted to upgrade:
95
+
96
+ ```
97
+ ==================================================
98
+ A new version of mdify is available!
99
+ Current version: 0.1.0
100
+ Latest version: 0.2.0
101
+ ==================================================
102
+
103
+ Run upgrade now? [y/N]
104
+ ```
105
+
106
+ ### Manual upgrade
107
+
108
+ ```bash
109
+ ~/.mdify/install.sh --upgrade
110
+ ```
111
+
112
+ ### Check for updates manually
113
+
114
+ ```bash
115
+ mdify --check-update
116
+ ```
117
+
118
+ ### Disable update checks
119
+
120
+ To disable automatic update checks, set the environment variable:
121
+
122
+ ```bash
123
+ export MDIFY_NO_UPDATE_CHECK=1
124
+ ```
125
+
126
+ Or for a single run:
127
+
128
+ ```bash
129
+ MDIFY_NO_UPDATE_CHECK=1 mdify document.pdf
130
+ ```
131
+
132
+ ## Uninstall
133
+
134
+ ```bash
135
+ ~/.mdify/uninstall.sh
136
+ ```
137
+
138
+ Or if installed via pip:
139
+
140
+ ```bash
141
+ pip uninstall mdify
142
+ ```
143
+
144
+ ## Development
145
+
146
+ ### Building for PyPI
147
+
148
+ Install build tools:
149
+
150
+ ```bash
151
+ pip install --upgrade build twine
152
+ ```
153
+
154
+ Build the package:
155
+
156
+ ```bash
157
+ python -m build
158
+ ```
159
+
160
+ Test locally:
161
+
162
+ ```bash
163
+ pip install dist/mdify-*.whl
164
+ ```
165
+
166
+ See [PUBLISHING.md](PUBLISHING.md) for complete PyPI publishing instructions.
167
+
168
+ ## License
169
+
170
+ MIT