mdify-cli 2.11.8__py3-none-any.whl → 2.11.10__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mdify-cli
3
- Version: 2.11.8
3
+ Version: 2.11.10
4
4
  Summary: Convert PDFs and document images into structured Markdown for LLM workflows
5
5
  Author: tiroq
6
6
  License-Expression: MIT
@@ -14,17 +14,17 @@ Classifier: Intended Audience :: Developers
14
14
  Classifier: Intended Audience :: End Users/Desktop
15
15
  Classifier: Operating System :: OS Independent
16
16
  Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.8
18
- Classifier: Programming Language :: Python :: 3.9
19
17
  Classifier: Programming Language :: Python :: 3.10
20
18
  Classifier: Programming Language :: Python :: 3.11
21
19
  Classifier: Programming Language :: Python :: 3.12
22
20
  Classifier: Topic :: Text Processing :: Markup :: Markdown
23
21
  Classifier: Topic :: Utilities
24
- Requires-Python: >=3.8
22
+ Requires-Python: >=3.10
25
23
  Description-Content-Type: text/markdown
26
24
  License-File: LICENSE
27
25
  Requires-Dist: requests
26
+ Requires-Dist: asyncssh>=2.10.0
27
+ Requires-Dist: pyyaml>=6.0
28
28
  Provides-Extra: dev
29
29
  Requires-Dist: pytest>=7.0; extra == "dev"
30
30
  Dynamic: license-file
@@ -120,6 +120,72 @@ mdify --gpu documents/*.pdf
120
120
 
121
121
  Requires NVIDIA GPU with CUDA support and nvidia-container-toolkit.
122
122
 
123
+ ### 🚀 Remote Server Execution (SSH)
124
+
125
+ **NEW:** Convert documents on remote servers via SSH to offload resource-intensive processing:
126
+
127
+ ```bash
128
+ # Basic remote conversion
129
+ mdify document.pdf --remote-host server.example.com
130
+
131
+ # Use SSH config alias
132
+ mdify document.pdf --remote-host production
133
+
134
+ # With custom configuration
135
+ mdify docs/*.pdf --remote-host 192.168.1.100 \
136
+ --remote-user admin \
137
+ --remote-key ~/.ssh/id_rsa
138
+
139
+ # Validate remote server before processing
140
+ mdify document.pdf --remote-host server --remote-validate-only
141
+ ```
142
+
143
+ **How it works:**
144
+ 1. Connects to remote server via SSH
145
+ 2. Validates remote resources (disk space, memory, Docker/Podman)
146
+ 3. Uploads files via SFTP
147
+ 4. Starts remote container automatically
148
+ 5. Converts documents on remote server
149
+ 6. Downloads results via SFTP
150
+ 7. Cleans up remote files and stops container
151
+
152
+ **Requirements:**
153
+ - SSH key authentication (password auth not supported for security)
154
+ - Docker or Podman installed on remote server
155
+ - Minimum 5GB disk space and 2GB RAM on remote
156
+
157
+ **SSH Configuration:**
158
+
159
+ Create `~/.mdify/remote.conf` for reusable settings:
160
+ ```yaml
161
+ host: production.example.com
162
+ port: 22
163
+ username: deploy
164
+ key_file: ~/.ssh/deploy_key
165
+ work_dir: /tmp/mdify-remote
166
+ container_runtime: docker
167
+ timeout: 30
168
+ ```
169
+
170
+ Or use existing `~/.ssh/config`:
171
+ ```
172
+ Host production
173
+ HostName 192.168.1.100
174
+ User deploy
175
+ Port 2222
176
+ IdentityFile ~/.ssh/deploy_key
177
+ ```
178
+
179
+ Then simply: `mdify doc.pdf --remote-host production`
180
+
181
+ **Configuration Precedence** (highest to lowest):
182
+ 1. CLI arguments (`--remote-*`)
183
+ 2. `~/.mdify/remote.conf`
184
+ 3. `~/.ssh/config`
185
+ 4. Built-in defaults
186
+
187
+ See the [SSH Remote Server Guide](#ssh-remote-server-options) below for all options.
188
+
123
189
  ### ⚠️ PII Masking (Deprecated)
124
190
 
125
191
  The `--mask` flag is deprecated and will be ignored in this version. PII masking functionality was available in older versions using a custom runtime but is not supported with the current docling-serve backend.
@@ -158,6 +224,24 @@ The first conversion takes longer (~30-60s) as the container loads ML models int
158
224
  | `--check-update` | Check for available updates and exit |
159
225
  | `--version` | Show version and exit |
160
226
 
227
+ ### SSH Remote Server Options
228
+
229
+ | Option | Description |
230
+ | ------ | ----------- |
231
+ | `--remote-host HOST` | SSH hostname or IP (required for remote mode) |
232
+ | `--remote-port PORT` | SSH port (default: 22) |
233
+ | `--remote-user USER` | SSH username (uses ~/.ssh/config or current user) |
234
+ | `--remote-key PATH` | SSH private key file path |
235
+ | `--remote-key-passphrase PASS` | SSH key passphrase |
236
+ | `--remote-timeout SEC` | SSH connection timeout in seconds (default: 30) |
237
+ | `--remote-work-dir DIR` | Remote working directory (default: /tmp/mdify-remote) |
238
+ | `--remote-runtime RT` | Remote container runtime: docker or podman (auto-detected) |
239
+ | `--remote-config PATH` | Path to mdify remote config file (default: ~/.mdify/remote.conf) |
240
+ | `--remote-skip-ssh-config` | Don't load settings from ~/.ssh/config |
241
+ | `--remote-skip-validation` | Skip remote resource validation (not recommended) |
242
+ | `--remote-validate-only` | Validate remote server and exit (dry run) |
243
+ | `--remote-debug` | Enable detailed SSH debug logging |
244
+
161
245
  ### Container Runtime Selection
162
246
 
163
247
  mdify automatically detects and uses the best available container runtime. The detection order differs by platform:
@@ -292,6 +376,110 @@ Or if installed via pip:
292
376
  pip uninstall mdify-cli
293
377
  ```
294
378
 
379
+ ## Troubleshooting
380
+
381
+ ### SSH Remote Server Issues
382
+
383
+ **Connection Refused**
384
+
385
+ ```
386
+ Error: SSH connection failed: Connection refused (host:22)
387
+ ```
388
+
389
+ - Verify SSH server is running on remote: `ssh user@host`
390
+ - Check firewall allows port 22 (or custom SSH port)
391
+ - Verify hostname/IP is correct
392
+
393
+ **Authentication Failed**
394
+
395
+ ```
396
+ Error: SSH authentication failed
397
+ ```
398
+
399
+ - Use SSH key authentication (password auth not supported)
400
+ - Verify key file exists: `ls -l ~/.ssh/id_rsa`
401
+ - Check key permissions: `chmod 600 ~/.ssh/id_rsa`
402
+ - Test SSH manually: `ssh -i ~/.ssh/id_rsa user@host`
403
+ - Add key to ssh-agent: `ssh-add ~/.ssh/id_rsa`
404
+
405
+ **Remote Container Runtime Not Found**
406
+
407
+ ```
408
+ Error: Container runtime not available: docker/podman
409
+ ```
410
+
411
+ - Install Docker on remote: `sudo apt install docker.io` (Ubuntu/Debian)
412
+ - Or install Podman: `sudo dnf install podman` (Fedora/RHEL)
413
+ - Add user to docker group: `sudo usermod -aG docker $USER`
414
+ - Verify remote Docker running: `ssh user@host docker ps`
415
+
416
+ **Insufficient Remote Resources**
417
+
418
+ ```
419
+ Warning: Less than 5GB available on remote
420
+ ```
421
+
422
+ - Free up disk space on remote server
423
+ - Use `--remote-work-dir` to specify different partition
424
+ - Use `--remote-skip-validation` to bypass check (not recommended)
425
+
426
+ **File Transfer Timeout**
427
+
428
+ ```
429
+ Error: File transfer timeout
430
+ ```
431
+
432
+ - Increase timeout: `--remote-timeout 120`
433
+ - Check network bandwidth and stability
434
+ - Try smaller files first to verify connection
435
+
436
+ **Container Health Check Fails**
437
+
438
+ ```
439
+ Error: Container failed to become healthy within 60 seconds
440
+ ```
441
+
442
+ - Check remote Docker logs: `ssh user@host docker logs mdify-remote-<id>`
443
+ - Verify port 5001 not in use: `ssh user@host netstat -tuln | grep 5001`
444
+ - Try different port: `--port 5002`
445
+
446
+ **SSH Config Not Loaded**
447
+
448
+ If using SSH config alias but getting connection errors:
449
+
450
+ ```bash
451
+ # Verify SSH config is valid
452
+ cat ~/.ssh/config
453
+
454
+ # Test SSH config works
455
+ ssh your-alias
456
+
457
+ # Use explicit connection if needed
458
+ mdify doc.pdf --remote-host 192.168.1.100 --remote-user admin
459
+ ```
460
+
461
+ **Permission Denied on Remote**
462
+
463
+ ```
464
+ Error: Work directory not writable: /tmp/mdify-remote
465
+ ```
466
+
467
+ - SSH to remote and check permissions: `ssh user@host ls -ld /tmp`
468
+ - Use directory in your home: `--remote-work-dir ~/mdify-temp`
469
+ - Fix permissions: `ssh user@host chmod 777 /tmp/mdify-remote`
470
+
471
+ **Debug Mode**
472
+
473
+ Enable detailed logging for troubleshooting:
474
+
475
+ ```bash
476
+ # Debug SSH operations
477
+ mdify doc.pdf --remote-host server --remote-debug
478
+
479
+ # Debug local operations
480
+ MDIFY_DEBUG=1 mdify doc.pdf
481
+ ```
482
+
295
483
  ## Development
296
484
 
297
485
  ### Task automation
@@ -0,0 +1,17 @@
1
+ assets/mdify.png,sha256=qUj7WXWqNwpI2KNXOW79XJwqFqa-UI0JEkmt1mmy4Rg,1820418
2
+ mdify/__init__.py,sha256=t4ep3wvMfrrQN_YXP8F2Sb-RNUQOv5ulq9AyuWPdlmk,92
3
+ mdify/__main__.py,sha256=bhpJ00co6MfaVOdH4XLoW04NtLYDa_oJK7ODzfLrn9M,143
4
+ mdify/cli.py,sha256=xU_HWrOVYB67GRGz77l2ToLWlh2OM1FPgZjZDLT3MVk,73705
5
+ mdify/container.py,sha256=BjL5ZR__n1i_WHifXKllTPoqO7IuOUdPDo5esuNg0Iw,8213
6
+ mdify/docling_client.py,sha256=xuQR6sC1v3EPloOSwExoHCqT4uUxE8myYq-Yeby3C2I,7975
7
+ mdify/ssh/__init__.py,sha256=SmRWgwEvAQZ_ARHlKTb9QDPwVAcz6dvPUks2pZFWLAU,271
8
+ mdify/ssh/client.py,sha256=MNMBrL5Xk2rFo28Ytw80hWX2vQ3_CXlIL4VathNtK-I,14873
9
+ mdify/ssh/models.py,sha256=jpbDS1yGhd7Xwq2tW7bZv14mTBlR8DCfhT4x-Xf2Wq4,17676
10
+ mdify/ssh/remote_container.py,sha256=kmScAlmHI9rJLKliYcYQXDZHF7PYYiD-_rRV-S0fffM,8462
11
+ mdify/ssh/transfer.py,sha256=aZZgylDjoqx6PEpaMu2zxkDF04w7btiOnMExmtt922A,10574
12
+ mdify_cli-2.11.10.dist-info/licenses/LICENSE,sha256=NWM66Uv-XuSMKaU-gaPmvfyk4WgE6zcIPr78wyg6GAo,1065
13
+ mdify_cli-2.11.10.dist-info/METADATA,sha256=oIYDdJBToWnBfRJW45MgPyiZ2qw-en3WiUgrfouia6I,14768
14
+ mdify_cli-2.11.10.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
15
+ mdify_cli-2.11.10.dist-info/entry_points.txt,sha256=0Xki8f5lADQUtwdt6Eq_FEaieI6Byhk8UE7BuDhChMg,41
16
+ mdify_cli-2.11.10.dist-info/top_level.txt,sha256=qltzf7h8owHq7dxCdfCkSHY8gT21hn1_E8P-VWS_OKM,6
17
+ mdify_cli-2.11.10.dist-info/RECORD,,
@@ -1,12 +0,0 @@
1
- assets/mdify.png,sha256=qUj7WXWqNwpI2KNXOW79XJwqFqa-UI0JEkmt1mmy4Rg,1820418
2
- mdify/__init__.py,sha256=2o-AESFmF0rXXPkxbMNN-Qq9wmMK4wpqdFbx-_W-5Vw,91
3
- mdify/__main__.py,sha256=bhpJ00co6MfaVOdH4XLoW04NtLYDa_oJK7ODzfLrn9M,143
4
- mdify/cli.py,sha256=4LIl9szxndnt57pq20DyQq7_Eco9Z6DxssNgC_8EQKM,48317
5
- mdify/container.py,sha256=ARdFs-TOSh5vHGtBJ0CppfpZFaiprIuRdQ5wDH0NfrY,8377
6
- mdify/docling_client.py,sha256=xuQR6sC1v3EPloOSwExoHCqT4uUxE8myYq-Yeby3C2I,7975
7
- mdify_cli-2.11.8.dist-info/licenses/LICENSE,sha256=NWM66Uv-XuSMKaU-gaPmvfyk4WgE6zcIPr78wyg6GAo,1065
8
- mdify_cli-2.11.8.dist-info/METADATA,sha256=LjsY8TyklrMNr-EtVgrgQ8cdbhMNm7e8XBz0nxkfRA4,9623
9
- mdify_cli-2.11.8.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
10
- mdify_cli-2.11.8.dist-info/entry_points.txt,sha256=0Xki8f5lADQUtwdt6Eq_FEaieI6Byhk8UE7BuDhChMg,41
11
- mdify_cli-2.11.8.dist-info/top_level.txt,sha256=qltzf7h8owHq7dxCdfCkSHY8gT21hn1_E8P-VWS_OKM,6
12
- mdify_cli-2.11.8.dist-info/RECORD,,