mdify-cli 2.9.0__py3-none-any.whl → 2.9.2__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 +33 -0
- {mdify_cli-2.9.0.dist-info → mdify_cli-2.9.2.dist-info}/METADATA +1 -1
- mdify_cli-2.9.2.dist-info/RECORD +12 -0
- mdify_cli-2.9.0.dist-info/RECORD +0 -12
- {mdify_cli-2.9.0.dist-info → mdify_cli-2.9.2.dist-info}/WHEEL +0 -0
- {mdify_cli-2.9.0.dist-info → mdify_cli-2.9.2.dist-info}/entry_points.txt +0 -0
- {mdify_cli-2.9.0.dist-info → mdify_cli-2.9.2.dist-info}/licenses/LICENSE +0 -0
- {mdify_cli-2.9.0.dist-info → mdify_cli-2.9.2.dist-info}/top_level.txt +0 -0
mdify/__init__.py
CHANGED
mdify/cli.py
CHANGED
|
@@ -281,6 +281,27 @@ def check_image_exists(runtime: str, image: str) -> bool:
|
|
|
281
281
|
True if image exists locally.
|
|
282
282
|
"""
|
|
283
283
|
try:
|
|
284
|
+
runtime_name = os.path.basename(runtime)
|
|
285
|
+
|
|
286
|
+
# Apple Container uses 'image list' command (two words)
|
|
287
|
+
if runtime_name == "container":
|
|
288
|
+
result = subprocess.run(
|
|
289
|
+
[runtime, "image", "list", "--format", "json"],
|
|
290
|
+
capture_output=True,
|
|
291
|
+
check=False,
|
|
292
|
+
)
|
|
293
|
+
if result.returncode == 0 and result.stdout:
|
|
294
|
+
try:
|
|
295
|
+
images = json.loads(result.stdout.decode())
|
|
296
|
+
# Check if image exists in the list
|
|
297
|
+
for img in images:
|
|
298
|
+
if img.get("name") == image or image in img.get("repoTags", []):
|
|
299
|
+
return True
|
|
300
|
+
except json.JSONDecodeError:
|
|
301
|
+
pass
|
|
302
|
+
return False
|
|
303
|
+
|
|
304
|
+
# Docker/Podman/OrbStack/Colima use standard 'image inspect'
|
|
284
305
|
result = subprocess.run(
|
|
285
306
|
[runtime, "image", "inspect", image],
|
|
286
307
|
capture_output=True,
|
|
@@ -307,6 +328,18 @@ def pull_image(runtime: str, image: str, quiet: bool = False) -> bool:
|
|
|
307
328
|
print(f"Pulling image: {image}")
|
|
308
329
|
|
|
309
330
|
try:
|
|
331
|
+
runtime_name = os.path.basename(runtime)
|
|
332
|
+
|
|
333
|
+
# Apple Container uses 'image pull' command (two words)
|
|
334
|
+
if runtime_name == "container":
|
|
335
|
+
result = subprocess.run(
|
|
336
|
+
[runtime, "image", "pull", image],
|
|
337
|
+
capture_output=quiet,
|
|
338
|
+
check=False,
|
|
339
|
+
)
|
|
340
|
+
return result.returncode == 0
|
|
341
|
+
|
|
342
|
+
# Docker/Podman/OrbStack/Colima use standard 'pull'
|
|
310
343
|
result = subprocess.run(
|
|
311
344
|
[runtime, "pull", image],
|
|
312
345
|
capture_output=quiet,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
assets/mdify.png,sha256=qUj7WXWqNwpI2KNXOW79XJwqFqa-UI0JEkmt1mmy4Rg,1820418
|
|
2
|
+
mdify/__init__.py,sha256=IwBIBXy1TpAysKlAug7CjrmQeffd-0iNt3vH_wXsH34,90
|
|
3
|
+
mdify/__main__.py,sha256=bhpJ00co6MfaVOdH4XLoW04NtLYDa_oJK7ODzfLrn9M,143
|
|
4
|
+
mdify/cli.py,sha256=WjKVbJ4K741zeVHTetQHEnxQ1kmdtEB_9uJcGRU_FPc,33664
|
|
5
|
+
mdify/container.py,sha256=tkk0nv7EquL-rKUY4nkS_yGITb7mqw8B7eEfuqaeVrg,5239
|
|
6
|
+
mdify/docling_client.py,sha256=xuQR6sC1v3EPloOSwExoHCqT4uUxE8myYq-Yeby3C2I,7975
|
|
7
|
+
mdify_cli-2.9.2.dist-info/licenses/LICENSE,sha256=NWM66Uv-XuSMKaU-gaPmvfyk4WgE6zcIPr78wyg6GAo,1065
|
|
8
|
+
mdify_cli-2.9.2.dist-info/METADATA,sha256=dbMOXYVIYXFySKLfW7t552Ey2FT7Q7nDA-JlsA4reeE,9622
|
|
9
|
+
mdify_cli-2.9.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
10
|
+
mdify_cli-2.9.2.dist-info/entry_points.txt,sha256=0Xki8f5lADQUtwdt6Eq_FEaieI6Byhk8UE7BuDhChMg,41
|
|
11
|
+
mdify_cli-2.9.2.dist-info/top_level.txt,sha256=qltzf7h8owHq7dxCdfCkSHY8gT21hn1_E8P-VWS_OKM,6
|
|
12
|
+
mdify_cli-2.9.2.dist-info/RECORD,,
|
mdify_cli-2.9.0.dist-info/RECORD
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
assets/mdify.png,sha256=qUj7WXWqNwpI2KNXOW79XJwqFqa-UI0JEkmt1mmy4Rg,1820418
|
|
2
|
-
mdify/__init__.py,sha256=PSgJ3K4AOS5lkZLc88TMzg38yuZ6s4Z_q-KDUP1XyI0,90
|
|
3
|
-
mdify/__main__.py,sha256=bhpJ00co6MfaVOdH4XLoW04NtLYDa_oJK7ODzfLrn9M,143
|
|
4
|
-
mdify/cli.py,sha256=Zdl1bnZ2fXdDNrnjwy2pu-g6NY5VHqDJRqopkhn5Dxk,32340
|
|
5
|
-
mdify/container.py,sha256=tkk0nv7EquL-rKUY4nkS_yGITb7mqw8B7eEfuqaeVrg,5239
|
|
6
|
-
mdify/docling_client.py,sha256=xuQR6sC1v3EPloOSwExoHCqT4uUxE8myYq-Yeby3C2I,7975
|
|
7
|
-
mdify_cli-2.9.0.dist-info/licenses/LICENSE,sha256=NWM66Uv-XuSMKaU-gaPmvfyk4WgE6zcIPr78wyg6GAo,1065
|
|
8
|
-
mdify_cli-2.9.0.dist-info/METADATA,sha256=yu2RXWJ-V6IiN0Cdtgmn_mD9MlHy16MHamnZvB0Plo0,9622
|
|
9
|
-
mdify_cli-2.9.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
10
|
-
mdify_cli-2.9.0.dist-info/entry_points.txt,sha256=0Xki8f5lADQUtwdt6Eq_FEaieI6Byhk8UE7BuDhChMg,41
|
|
11
|
-
mdify_cli-2.9.0.dist-info/top_level.txt,sha256=qltzf7h8owHq7dxCdfCkSHY8gT21hn1_E8P-VWS_OKM,6
|
|
12
|
-
mdify_cli-2.9.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|