mdify-cli 2.11.5__py3-none-any.whl → 2.11.6__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 +12 -4
- mdify/container.py +10 -6
- {mdify_cli-2.11.5.dist-info → mdify_cli-2.11.6.dist-info}/METADATA +1 -1
- mdify_cli-2.11.6.dist-info/RECORD +12 -0
- mdify_cli-2.11.5.dist-info/RECORD +0 -12
- {mdify_cli-2.11.5.dist-info → mdify_cli-2.11.6.dist-info}/WHEEL +0 -0
- {mdify_cli-2.11.5.dist-info → mdify_cli-2.11.6.dist-info}/entry_points.txt +0 -0
- {mdify_cli-2.11.5.dist-info → mdify_cli-2.11.6.dist-info}/licenses/LICENSE +0 -0
- {mdify_cli-2.11.5.dist-info → mdify_cli-2.11.6.dist-info}/top_level.txt +0 -0
mdify/__init__.py
CHANGED
mdify/cli.py
CHANGED
|
@@ -1054,13 +1054,21 @@ def main() -> int:
|
|
|
1054
1054
|
|
|
1055
1055
|
# Always show logs for connection errors to surface root cause
|
|
1056
1056
|
print(" Retrieving container logs...", file=sys.stderr)
|
|
1057
|
-
logs = container.get_logs(tail=
|
|
1057
|
+
logs, log_error = container.get_logs(tail=50)
|
|
1058
1058
|
if logs:
|
|
1059
|
-
print(" Container logs (last
|
|
1059
|
+
print(" Container logs (last 50 lines):", file=sys.stderr)
|
|
1060
1060
|
for line in logs.strip().split("\n"):
|
|
1061
|
-
|
|
1061
|
+
if line.strip(): # Skip empty lines
|
|
1062
|
+
print(f" {line}", file=sys.stderr)
|
|
1063
|
+
elif log_error:
|
|
1064
|
+
print(f" Error retrieving logs: {log_error}", file=sys.stderr)
|
|
1065
|
+
if not DEBUG:
|
|
1066
|
+
print(
|
|
1067
|
+
" Tip: re-run with MDIFY_DEBUG=1 to preserve container for inspection",
|
|
1068
|
+
file=sys.stderr,
|
|
1069
|
+
)
|
|
1062
1070
|
else:
|
|
1063
|
-
print(" No logs available", file=sys.stderr)
|
|
1071
|
+
print(" No logs available (container may have been removed)", file=sys.stderr)
|
|
1064
1072
|
if not DEBUG:
|
|
1065
1073
|
print(
|
|
1066
1074
|
" Tip: re-run with MDIFY_DEBUG=1 to preserve container logs",
|
mdify/container.py
CHANGED
|
@@ -135,17 +135,17 @@ class DoclingContainer:
|
|
|
135
135
|
check=False,
|
|
136
136
|
)
|
|
137
137
|
|
|
138
|
-
def get_logs(self, tail: int = 50) -> str:
|
|
138
|
+
def get_logs(self, tail: int = 50) -> tuple[str, str]:
|
|
139
139
|
"""Get container logs for debugging.
|
|
140
140
|
|
|
141
141
|
Args:
|
|
142
142
|
tail: Number of lines to retrieve from end of logs
|
|
143
143
|
|
|
144
144
|
Returns:
|
|
145
|
-
|
|
145
|
+
Tuple of (stdout, stderr) from container logs
|
|
146
146
|
"""
|
|
147
147
|
if not self.container_name:
|
|
148
|
-
return ""
|
|
148
|
+
return ("", "No container name set")
|
|
149
149
|
|
|
150
150
|
try:
|
|
151
151
|
result = subprocess.run(
|
|
@@ -154,9 +154,13 @@ class DoclingContainer:
|
|
|
154
154
|
text=True,
|
|
155
155
|
check=False,
|
|
156
156
|
)
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
if result.returncode != 0:
|
|
158
|
+
return ("", f"Failed to get logs (exit {result.returncode}): {result.stderr}")
|
|
159
|
+
# Container logs come from both stdout and stderr
|
|
160
|
+
combined = result.stdout + result.stderr
|
|
161
|
+
return (combined, "")
|
|
162
|
+
except Exception as e:
|
|
163
|
+
return ("", f"Exception getting logs: {e}")
|
|
160
164
|
|
|
161
165
|
def is_running(self) -> bool:
|
|
162
166
|
"""Check if container process is still running.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
assets/mdify.png,sha256=qUj7WXWqNwpI2KNXOW79XJwqFqa-UI0JEkmt1mmy4Rg,1820418
|
|
2
|
+
mdify/__init__.py,sha256=0wE2t03uA9GJS4LLwuLvIGvAiy0KAkUI5uBzNmbwIdU,91
|
|
3
|
+
mdify/__main__.py,sha256=bhpJ00co6MfaVOdH4XLoW04NtLYDa_oJK7ODzfLrn9M,143
|
|
4
|
+
mdify/cli.py,sha256=UxzSHuYQNYKYt-o_-CiMZ0eCovuSLTrjtpaG6Gw0Wzc,37863
|
|
5
|
+
mdify/container.py,sha256=uyruZtNkepjq6KoWYCQM1U6x0Lu2IHffpVRA-D9BlMI,7224
|
|
6
|
+
mdify/docling_client.py,sha256=xuQR6sC1v3EPloOSwExoHCqT4uUxE8myYq-Yeby3C2I,7975
|
|
7
|
+
mdify_cli-2.11.6.dist-info/licenses/LICENSE,sha256=NWM66Uv-XuSMKaU-gaPmvfyk4WgE6zcIPr78wyg6GAo,1065
|
|
8
|
+
mdify_cli-2.11.6.dist-info/METADATA,sha256=lbfKq932Zp5BA0IfQ2pY5kGmdHl4xt-EBBXWuHnZlL0,9623
|
|
9
|
+
mdify_cli-2.11.6.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
10
|
+
mdify_cli-2.11.6.dist-info/entry_points.txt,sha256=0Xki8f5lADQUtwdt6Eq_FEaieI6Byhk8UE7BuDhChMg,41
|
|
11
|
+
mdify_cli-2.11.6.dist-info/top_level.txt,sha256=qltzf7h8owHq7dxCdfCkSHY8gT21hn1_E8P-VWS_OKM,6
|
|
12
|
+
mdify_cli-2.11.6.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
assets/mdify.png,sha256=qUj7WXWqNwpI2KNXOW79XJwqFqa-UI0JEkmt1mmy4Rg,1820418
|
|
2
|
-
mdify/__init__.py,sha256=3suYlg_g3WiwzZ4VOd6l_T33tmf0s2kt-XchFQcBdZw,91
|
|
3
|
-
mdify/__main__.py,sha256=bhpJ00co6MfaVOdH4XLoW04NtLYDa_oJK7ODzfLrn9M,143
|
|
4
|
-
mdify/cli.py,sha256=hQldYK0BziW0SZcwvQW4ZMq_Osj1I664TiQIpLKeUSM,37300
|
|
5
|
-
mdify/container.py,sha256=tX66OaT7uKhopQm88XtULJUsGUzxtlXvxNXyW7Mtbbw,6909
|
|
6
|
-
mdify/docling_client.py,sha256=xuQR6sC1v3EPloOSwExoHCqT4uUxE8myYq-Yeby3C2I,7975
|
|
7
|
-
mdify_cli-2.11.5.dist-info/licenses/LICENSE,sha256=NWM66Uv-XuSMKaU-gaPmvfyk4WgE6zcIPr78wyg6GAo,1065
|
|
8
|
-
mdify_cli-2.11.5.dist-info/METADATA,sha256=2e3vNMDSVJoPwxG3B4YCYp0yfOgHo4jXelhdeHRj49w,9623
|
|
9
|
-
mdify_cli-2.11.5.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
10
|
-
mdify_cli-2.11.5.dist-info/entry_points.txt,sha256=0Xki8f5lADQUtwdt6Eq_FEaieI6Byhk8UE7BuDhChMg,41
|
|
11
|
-
mdify_cli-2.11.5.dist-info/top_level.txt,sha256=qltzf7h8owHq7dxCdfCkSHY8gT21hn1_E8P-VWS_OKM,6
|
|
12
|
-
mdify_cli-2.11.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|