mdify-cli 2.9.1__py3-none-any.whl → 2.10.0__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.
- mdify/__init__.py +1 -1
- mdify/cli.py +26 -7
- {mdify_cli-2.9.1.dist-info → mdify_cli-2.10.0.dist-info}/METADATA +1 -1
- mdify_cli-2.10.0.dist-info/RECORD +12 -0
- mdify_cli-2.9.1.dist-info/RECORD +0 -12
- {mdify_cli-2.9.1.dist-info → mdify_cli-2.10.0.dist-info}/WHEEL +0 -0
- {mdify_cli-2.9.1.dist-info → mdify_cli-2.10.0.dist-info}/entry_points.txt +0 -0
- {mdify_cli-2.9.1.dist-info → mdify_cli-2.10.0.dist-info}/licenses/LICENSE +0 -0
- {mdify_cli-2.9.1.dist-info → mdify_cli-2.10.0.dist-info}/top_level.txt +0 -0
mdify/__init__.py
CHANGED
mdify/cli.py
CHANGED
|
@@ -283,10 +283,10 @@ def check_image_exists(runtime: str, image: str) -> bool:
|
|
|
283
283
|
try:
|
|
284
284
|
runtime_name = os.path.basename(runtime)
|
|
285
285
|
|
|
286
|
-
# Apple Container uses 'image
|
|
286
|
+
# Apple Container uses 'image list' command (two words)
|
|
287
287
|
if runtime_name == "container":
|
|
288
288
|
result = subprocess.run(
|
|
289
|
-
[runtime, "image
|
|
289
|
+
[runtime, "image", "list", "--format", "json"],
|
|
290
290
|
capture_output=True,
|
|
291
291
|
check=False,
|
|
292
292
|
)
|
|
@@ -330,10 +330,10 @@ def pull_image(runtime: str, image: str, quiet: bool = False) -> bool:
|
|
|
330
330
|
try:
|
|
331
331
|
runtime_name = os.path.basename(runtime)
|
|
332
332
|
|
|
333
|
-
# Apple Container uses 'image
|
|
333
|
+
# Apple Container uses 'image pull' command (two words)
|
|
334
334
|
if runtime_name == "container":
|
|
335
335
|
result = subprocess.run(
|
|
336
|
-
[runtime, "image
|
|
336
|
+
[runtime, "image", "pull", image],
|
|
337
337
|
capture_output=quiet,
|
|
338
338
|
check=False,
|
|
339
339
|
)
|
|
@@ -521,8 +521,8 @@ class Spinner:
|
|
|
521
521
|
self.running = False
|
|
522
522
|
if self.thread:
|
|
523
523
|
self.thread.join(timeout=0.5)
|
|
524
|
-
# Clear the spinner line
|
|
525
|
-
print(f"\r{' ' *
|
|
524
|
+
# Clear the spinner line with enough spaces to cover the longest possible line
|
|
525
|
+
print(f"\r{' ' * 120}\r", end="", flush=True)
|
|
526
526
|
|
|
527
527
|
|
|
528
528
|
# =============================================================================
|
|
@@ -770,6 +770,7 @@ Examples:
|
|
|
770
770
|
|
|
771
771
|
def main() -> int:
|
|
772
772
|
"""Main entry point for the CLI."""
|
|
773
|
+
print(f"mdify v{__version__}", file=sys.stderr)
|
|
773
774
|
args = parse_args()
|
|
774
775
|
|
|
775
776
|
# Handle --check-update flag
|
|
@@ -917,6 +918,8 @@ def main() -> int:
|
|
|
917
918
|
|
|
918
919
|
if not args.quiet:
|
|
919
920
|
print(f"Found {total_files} file(s) to convert ({format_size(total_size)})")
|
|
921
|
+
print(f"Source: {input_path.resolve()}")
|
|
922
|
+
print(f"Output: {output_dir.resolve()}")
|
|
920
923
|
print(f"Using runtime: {runtime}")
|
|
921
924
|
print(f"Using image: {image}")
|
|
922
925
|
print()
|
|
@@ -979,6 +982,7 @@ def main() -> int:
|
|
|
979
982
|
)
|
|
980
983
|
elapsed = time.time() - start_time
|
|
981
984
|
|
|
985
|
+
# Stop spinner before any output
|
|
982
986
|
if not args.quiet:
|
|
983
987
|
spinner.stop()
|
|
984
988
|
|
|
@@ -1001,12 +1005,27 @@ def main() -> int:
|
|
|
1001
1005
|
except Exception as e:
|
|
1002
1006
|
elapsed = time.time() - start_time
|
|
1003
1007
|
failed_count += 1
|
|
1008
|
+
# Stop spinner before printing error
|
|
1004
1009
|
if not args.quiet:
|
|
1005
1010
|
spinner.stop()
|
|
1011
|
+
|
|
1012
|
+
# Check if container is still healthy
|
|
1013
|
+
error_msg = str(e)
|
|
1014
|
+
if "Connection refused" in error_msg or "Connection aborted" in error_msg or "RemoteDisconnected" in error_msg:
|
|
1015
|
+
if not container.is_ready():
|
|
1016
|
+
if not args.quiet:
|
|
1017
|
+
print(
|
|
1018
|
+
f"{progress} {input_file.name} ✗ ({format_duration(elapsed)})"
|
|
1019
|
+
)
|
|
1020
|
+
print(f" Error: Container crashed (file may be too complex or large)", file=sys.stderr)
|
|
1021
|
+
print(f" Stopping remaining conversions", file=sys.stderr)
|
|
1022
|
+
break
|
|
1023
|
+
|
|
1024
|
+
if not args.quiet:
|
|
1006
1025
|
print(
|
|
1007
1026
|
f"{progress} {input_file.name} ✗ ({format_duration(elapsed)})"
|
|
1008
1027
|
)
|
|
1009
|
-
print(f" Error: {
|
|
1028
|
+
print(f" Error: {error_msg}", file=sys.stderr)
|
|
1010
1029
|
|
|
1011
1030
|
total_elapsed = time.time() - conversion_start
|
|
1012
1031
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
assets/mdify.png,sha256=qUj7WXWqNwpI2KNXOW79XJwqFqa-UI0JEkmt1mmy4Rg,1820418
|
|
2
|
+
mdify/__init__.py,sha256=CjafoKZ-RjxyPtnUKVPmPjquU0FlfXDBkDDWZWb1ryw,91
|
|
3
|
+
mdify/__main__.py,sha256=bhpJ00co6MfaVOdH4XLoW04NtLYDa_oJK7ODzfLrn9M,143
|
|
4
|
+
mdify/cli.py,sha256=ZQMirATkanV0l8v0-A000uXPy7BaT5BPbVFSNSnpLJM,34817
|
|
5
|
+
mdify/container.py,sha256=tkk0nv7EquL-rKUY4nkS_yGITb7mqw8B7eEfuqaeVrg,5239
|
|
6
|
+
mdify/docling_client.py,sha256=xuQR6sC1v3EPloOSwExoHCqT4uUxE8myYq-Yeby3C2I,7975
|
|
7
|
+
mdify_cli-2.10.0.dist-info/licenses/LICENSE,sha256=NWM66Uv-XuSMKaU-gaPmvfyk4WgE6zcIPr78wyg6GAo,1065
|
|
8
|
+
mdify_cli-2.10.0.dist-info/METADATA,sha256=c2dtC7VEMeSqPhgbmQBLEM5N6zOkIXfWDPocCz9Ye8E,9623
|
|
9
|
+
mdify_cli-2.10.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
10
|
+
mdify_cli-2.10.0.dist-info/entry_points.txt,sha256=0Xki8f5lADQUtwdt6Eq_FEaieI6Byhk8UE7BuDhChMg,41
|
|
11
|
+
mdify_cli-2.10.0.dist-info/top_level.txt,sha256=qltzf7h8owHq7dxCdfCkSHY8gT21hn1_E8P-VWS_OKM,6
|
|
12
|
+
mdify_cli-2.10.0.dist-info/RECORD,,
|
mdify_cli-2.9.1.dist-info/RECORD
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
assets/mdify.png,sha256=qUj7WXWqNwpI2KNXOW79XJwqFqa-UI0JEkmt1mmy4Rg,1820418
|
|
2
|
-
mdify/__init__.py,sha256=6F0BWnZCqC4Il4XjrXJ4_Uaa1airfJKQXqY8INPQqPI,90
|
|
3
|
-
mdify/__main__.py,sha256=bhpJ00co6MfaVOdH4XLoW04NtLYDa_oJK7ODzfLrn9M,143
|
|
4
|
-
mdify/cli.py,sha256=V3WoX7Kmm5jzjtWt2a0v-kIkfYPrF-V7M5mLlZ0y-B0,33634
|
|
5
|
-
mdify/container.py,sha256=tkk0nv7EquL-rKUY4nkS_yGITb7mqw8B7eEfuqaeVrg,5239
|
|
6
|
-
mdify/docling_client.py,sha256=xuQR6sC1v3EPloOSwExoHCqT4uUxE8myYq-Yeby3C2I,7975
|
|
7
|
-
mdify_cli-2.9.1.dist-info/licenses/LICENSE,sha256=NWM66Uv-XuSMKaU-gaPmvfyk4WgE6zcIPr78wyg6GAo,1065
|
|
8
|
-
mdify_cli-2.9.1.dist-info/METADATA,sha256=ex5ghiFyguru9C7jWyXZSQDmtZUO65ROJcHWicuyC98,9622
|
|
9
|
-
mdify_cli-2.9.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
10
|
-
mdify_cli-2.9.1.dist-info/entry_points.txt,sha256=0Xki8f5lADQUtwdt6Eq_FEaieI6Byhk8UE7BuDhChMg,41
|
|
11
|
-
mdify_cli-2.9.1.dist-info/top_level.txt,sha256=qltzf7h8owHq7dxCdfCkSHY8gT21hn1_E8P-VWS_OKM,6
|
|
12
|
-
mdify_cli-2.9.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|