Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
feat: update image suffix handling to include SVG format in result images
myhloli3ca75e01b7c2
diff --git a/mineru/cli/common.py b/mineru/cli/common.pyindex cfd6a8a3..96d559fa 100644--- a/mineru/cli/common.py+++ b/mineru/cli/common.py@@ -31,7 +31,7 @@ if os.getenv("MINERU_LMDEPLOY_DEVICE", "") == "maca":pdf_suffixes = ["pdf"]-image_suffixes = ["png", "jpeg", "jp2", "webp", "gif", "bmp", "jpg", "tiff", "svg"]+image_suffixes = ["png", "jpeg", "jp2", "webp", "gif", "bmp", "jpg", "tiff"]docx_suffixes = ["docx"]pptx_suffixes = ["pptx"]xlsx_suffixes = ["xlsx"]diff --git a/mineru/cli/fast_api.py b/mineru/cli/fast_api.pyindex edcbaae6..5d9de889 100644--- a/mineru/cli/fast_api.py+++ b/mineru/cli/fast_api.py@@ -82,6 +82,7 @@ TASK_COMPLETED = "completed"TASK_FAILED = "failed"TASK_TERMINAL_STATES = {TASK_COMPLETED, TASK_FAILED}SUPPORTED_UPLOAD_SUFFIXES = pdf_suffixes + image_suffixes + office_suffixes+RESULT_IMAGE_SUFFIXES = set(image_suffixes) | {"svg"}DEFAULT_TASK_RETENTION_SECONDS = 24 * 60 * 60DEFAULT_TASK_CLEANUP_INTERVAL_SECONDS = 5 * 60DEFAULT_OUTPUT_ROOT = "./output"@@ -424,7 +425,7 @@ def get_images_dir_image_paths(images_dir: str) -> list[str]:return sorted(str(path)for path in Path(images_dir).iterdir()- if path.is_file() and path.suffix.lstrip(".").lower() in image_suffixes+ if path.is_file() and path.suffix.lstrip(".").lower() in RESULT_IMAGE_SUFFIXES)