mdify-cli 2.11.0__tar.gz → 2.11.2__tar.gz

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.0
3
+ Version: 2.11.2
4
4
  Summary: Convert PDFs and document images into structured Markdown for LLM workflows
5
5
  Author: tiroq
6
6
  License-Expression: MIT
@@ -1,3 +1,3 @@
1
1
  """mdify - Convert documents to Markdown via Docling container."""
2
2
 
3
- __version__ = "2.11.0"
3
+ __version__ = "2.11.2"
@@ -1023,29 +1023,44 @@ def main() -> int:
1023
1023
 
1024
1024
  # Check if container is still healthy
1025
1025
  error_msg = str(e)
1026
- if "Connection refused" in error_msg or "Connection aborted" in error_msg or "RemoteDisconnected" in error_msg:
1027
- if not container.is_ready():
1028
- if not args.quiet:
1029
- print(
1030
- f"{progress} {input_file.name} ✗ ({format_duration(elapsed)})"
1031
- )
1026
+ is_connection_error = "Connection refused" in error_msg or "Connection aborted" in error_msg or "RemoteDisconnected" in error_msg
1027
+
1028
+ if is_connection_error:
1029
+ container_alive = container.is_ready()
1030
+ if not args.quiet:
1031
+ print(
1032
+ f"{progress} {input_file.name} ✗ ({format_duration(elapsed)})"
1033
+ )
1034
+ if container_alive:
1035
+ print(f" Error: Connection lost (container may be restarting or overloaded)", file=sys.stderr)
1036
+ else:
1032
1037
  print(f" Error: Container crashed while processing file", file=sys.stderr)
1033
1038
  print(f" File may be too complex, large, or malformed", file=sys.stderr)
1039
+
1040
+ # Show logs for debugging (whether container is alive or not)
1041
+ if DEBUG or not container_alive:
1034
1042
  print(f" Retrieving container logs...", file=sys.stderr)
1035
- # Get last 20 lines of container logs for debugging
1036
- logs = container.get_logs(tail=20)
1043
+ logs = container.get_logs(tail=30)
1037
1044
  if logs:
1038
- print(f" Container logs (last 20 lines):", file=sys.stderr)
1045
+ print(f" Container logs (last 30 lines):", file=sys.stderr)
1039
1046
  for line in logs.strip().split('\n'):
1040
1047
  print(f" {line}", file=sys.stderr)
1048
+ else:
1049
+ print(f" No logs available", file=sys.stderr)
1050
+
1051
+ if not container_alive:
1041
1052
  print(f" Stopping remaining conversions", file=sys.stderr)
1053
+
1054
+ # Stop processing if container is dead
1055
+ if not container_alive:
1042
1056
  break
1043
-
1044
- if not args.quiet:
1045
- print(
1046
- f"{progress} {input_file.name} ✗ ({format_duration(elapsed)})"
1047
- )
1048
- print(f" Error: {error_msg}", file=sys.stderr)
1057
+ else:
1058
+ # Non-connection error
1059
+ if not args.quiet:
1060
+ print(
1061
+ f"{progress} {input_file.name} ✗ ({format_duration(elapsed)})"
1062
+ )
1063
+ print(f" Error: {error_msg}", file=sys.stderr)
1049
1064
 
1050
1065
  total_elapsed = time.time() - conversion_start
1051
1066
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mdify-cli
3
- Version: 2.11.0
3
+ Version: 2.11.2
4
4
  Summary: Convert PDFs and document images into structured Markdown for LLM workflows
5
5
  Author: tiroq
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mdify-cli"
3
- version = "2.11.0"
3
+ version = "2.11.2"
4
4
  description = "Convert PDFs and document images into structured Markdown for LLM workflows"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.8"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes