mdify-cli 2.9.5__py3-none-any.whl → 2.10.1__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 -4
- {mdify_cli-2.9.5.dist-info → mdify_cli-2.10.1.dist-info}/METADATA +1 -1
- mdify_cli-2.10.1.dist-info/RECORD +12 -0
- mdify_cli-2.9.5.dist-info/RECORD +0 -12
- {mdify_cli-2.9.5.dist-info → mdify_cli-2.10.1.dist-info}/WHEEL +0 -0
- {mdify_cli-2.9.5.dist-info → mdify_cli-2.10.1.dist-info}/entry_points.txt +0 -0
- {mdify_cli-2.9.5.dist-info → mdify_cli-2.10.1.dist-info}/licenses/LICENSE +0 -0
- {mdify_cli-2.9.5.dist-info → mdify_cli-2.10.1.dist-info}/top_level.txt +0 -0
mdify/__init__.py
CHANGED
mdify/cli.py
CHANGED
|
@@ -294,8 +294,10 @@ def check_image_exists(runtime: str, image: str) -> bool:
|
|
|
294
294
|
try:
|
|
295
295
|
images = json.loads(result.stdout.decode())
|
|
296
296
|
# Check if image exists in the list
|
|
297
|
+
# Apple Container returns format: [{"reference": "image:tag", "descriptor": {...}}]
|
|
297
298
|
for img in images:
|
|
298
|
-
|
|
299
|
+
reference = img.get("reference", "")
|
|
300
|
+
if reference == image or reference.startswith(f"{image}:"):
|
|
299
301
|
return True
|
|
300
302
|
except json.JSONDecodeError:
|
|
301
303
|
pass
|
|
@@ -521,8 +523,8 @@ class Spinner:
|
|
|
521
523
|
self.running = False
|
|
522
524
|
if self.thread:
|
|
523
525
|
self.thread.join(timeout=0.5)
|
|
524
|
-
# Clear the spinner line
|
|
525
|
-
print(f"\r{' ' *
|
|
526
|
+
# Clear the spinner line with enough spaces to cover the longest possible line
|
|
527
|
+
print(f"\r{' ' * 120}\r", end="", flush=True)
|
|
526
528
|
|
|
527
529
|
|
|
528
530
|
# =============================================================================
|
|
@@ -813,6 +815,10 @@ def main() -> int:
|
|
|
813
815
|
|
|
814
816
|
image_exists = check_image_exists(runtime, image)
|
|
815
817
|
|
|
818
|
+
if not args.quiet and image_exists:
|
|
819
|
+
print(f"Using cached image: {image}")
|
|
820
|
+
print()
|
|
821
|
+
|
|
816
822
|
# NOTE: Docker Desktop on macOS/Windows uses a VM, so disk space checks may not
|
|
817
823
|
# accurately reflect available space in the container's filesystem. Remote Docker
|
|
818
824
|
# daemons (DOCKER_HOST) are also not supported. In these cases, the check will
|
|
@@ -982,6 +988,7 @@ def main() -> int:
|
|
|
982
988
|
)
|
|
983
989
|
elapsed = time.time() - start_time
|
|
984
990
|
|
|
991
|
+
# Stop spinner before any output
|
|
985
992
|
if not args.quiet:
|
|
986
993
|
spinner.stop()
|
|
987
994
|
|
|
@@ -1004,12 +1011,27 @@ def main() -> int:
|
|
|
1004
1011
|
except Exception as e:
|
|
1005
1012
|
elapsed = time.time() - start_time
|
|
1006
1013
|
failed_count += 1
|
|
1014
|
+
# Stop spinner before printing error
|
|
1007
1015
|
if not args.quiet:
|
|
1008
1016
|
spinner.stop()
|
|
1017
|
+
|
|
1018
|
+
# Check if container is still healthy
|
|
1019
|
+
error_msg = str(e)
|
|
1020
|
+
if "Connection refused" in error_msg or "Connection aborted" in error_msg or "RemoteDisconnected" in error_msg:
|
|
1021
|
+
if not container.is_ready():
|
|
1022
|
+
if not args.quiet:
|
|
1023
|
+
print(
|
|
1024
|
+
f"{progress} {input_file.name} ✗ ({format_duration(elapsed)})"
|
|
1025
|
+
)
|
|
1026
|
+
print(f" Error: Container crashed (file may be too complex or large)", file=sys.stderr)
|
|
1027
|
+
print(f" Stopping remaining conversions", file=sys.stderr)
|
|
1028
|
+
break
|
|
1029
|
+
|
|
1030
|
+
if not args.quiet:
|
|
1009
1031
|
print(
|
|
1010
1032
|
f"{progress} {input_file.name} ✗ ({format_duration(elapsed)})"
|
|
1011
1033
|
)
|
|
1012
|
-
print(f" Error: {
|
|
1034
|
+
print(f" Error: {error_msg}", file=sys.stderr)
|
|
1013
1035
|
|
|
1014
1036
|
total_elapsed = time.time() - conversion_start
|
|
1015
1037
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
assets/mdify.png,sha256=qUj7WXWqNwpI2KNXOW79XJwqFqa-UI0JEkmt1mmy4Rg,1820418
|
|
2
|
+
mdify/__init__.py,sha256=c9HHXZfZwsYFSH08YfXMEClMKzbm9NIlShXjHP9tNsI,91
|
|
3
|
+
mdify/__main__.py,sha256=bhpJ00co6MfaVOdH4XLoW04NtLYDa_oJK7ODzfLrn9M,143
|
|
4
|
+
mdify/cli.py,sha256=NvOOhJ1uYwRkUHKIMt5vntHUEHqj96St5pH470GyaiE,35080
|
|
5
|
+
mdify/container.py,sha256=tkk0nv7EquL-rKUY4nkS_yGITb7mqw8B7eEfuqaeVrg,5239
|
|
6
|
+
mdify/docling_client.py,sha256=xuQR6sC1v3EPloOSwExoHCqT4uUxE8myYq-Yeby3C2I,7975
|
|
7
|
+
mdify_cli-2.10.1.dist-info/licenses/LICENSE,sha256=NWM66Uv-XuSMKaU-gaPmvfyk4WgE6zcIPr78wyg6GAo,1065
|
|
8
|
+
mdify_cli-2.10.1.dist-info/METADATA,sha256=vYWbynUKYVsRc1Wdx_vatsN0M53zkMfC0z9KzmlGLhg,9623
|
|
9
|
+
mdify_cli-2.10.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
10
|
+
mdify_cli-2.10.1.dist-info/entry_points.txt,sha256=0Xki8f5lADQUtwdt6Eq_FEaieI6Byhk8UE7BuDhChMg,41
|
|
11
|
+
mdify_cli-2.10.1.dist-info/top_level.txt,sha256=qltzf7h8owHq7dxCdfCkSHY8gT21hn1_E8P-VWS_OKM,6
|
|
12
|
+
mdify_cli-2.10.1.dist-info/RECORD,,
|
mdify_cli-2.9.5.dist-info/RECORD
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
assets/mdify.png,sha256=qUj7WXWqNwpI2KNXOW79XJwqFqa-UI0JEkmt1mmy4Rg,1820418
|
|
2
|
-
mdify/__init__.py,sha256=2B4BSnsG4F2MRYFnrBt_jrM8ezdHsUzJQdanIob8V-s,90
|
|
3
|
-
mdify/__main__.py,sha256=bhpJ00co6MfaVOdH4XLoW04NtLYDa_oJK7ODzfLrn9M,143
|
|
4
|
-
mdify/cli.py,sha256=PKAFh3VcVvsR_VhuVhW9fxtGOgxZOPqpSxr32ddi3-k,33814
|
|
5
|
-
mdify/container.py,sha256=tkk0nv7EquL-rKUY4nkS_yGITb7mqw8B7eEfuqaeVrg,5239
|
|
6
|
-
mdify/docling_client.py,sha256=xuQR6sC1v3EPloOSwExoHCqT4uUxE8myYq-Yeby3C2I,7975
|
|
7
|
-
mdify_cli-2.9.5.dist-info/licenses/LICENSE,sha256=NWM66Uv-XuSMKaU-gaPmvfyk4WgE6zcIPr78wyg6GAo,1065
|
|
8
|
-
mdify_cli-2.9.5.dist-info/METADATA,sha256=xWsWRqUTWe6_yWmDQ-AevpO3h3fYeRKgdC4nYbA2S04,9622
|
|
9
|
-
mdify_cli-2.9.5.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
10
|
-
mdify_cli-2.9.5.dist-info/entry_points.txt,sha256=0Xki8f5lADQUtwdt6Eq_FEaieI6Byhk8UE7BuDhChMg,41
|
|
11
|
-
mdify_cli-2.9.5.dist-info/top_level.txt,sha256=qltzf7h8owHq7dxCdfCkSHY8gT21hn1_E8P-VWS_OKM,6
|
|
12
|
-
mdify_cli-2.9.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|