Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

fix: update help text formatting for PDF parsing options and bump config version check

myhloli64d6a38bf5e9
diff --git a/mineru/cli/client.py b/mineru/cli/client.py
index d74e8438..fae1e888 100644
--- a/mineru/cli/client.py
+++ b/mineru/cli/client.py
@@ -44,12 +44,13 @@ if is_mac_os_version_supported():
'--method',
'method',
type=click.Choice(['auto', 'txt', 'ocr']),
- help="""the method for parsing pdf:\n
- auto: Automatically determine the method based on the file type.\n
- txt: Use text extraction method.\n
- ocr: Use OCR method for image-based PDFs.\n
- Without method specified, 'auto' will be used by default.\n
- Adapted only for the case where the backend is set to "pipeline".""",
+ help="""\b
+ the method for parsing pdf:
+ auto: Automatically determine the method based on the file type.
+ txt: Use text extraction method.
+ ocr: Use OCR method for image-based PDFs.
+ Without method specified, 'auto' will be used by default.
+ Adapted only for the case where the backend is set to 'pipeline'.""",
default='auto',
)
@click.option(
@@ -57,13 +58,14 @@ if is_mac_os_version_supported():
'--backend',
'backend',
type=click.Choice(backends),
- help="""the backend for parsing pdf:\n
- pipeline: More general.\n
- vlm-transformers: More general.\n
- vlm-mlx-engine: Faster than transformers (macOS 13.5+).\n
- vlm-vllm-engine: Faster(engine).\n
- vlm-http-client: Faster(client).\n
- without method specified, pipeline will be used by default.""",
+ help="""\b
+ the backend for parsing pdf:
+ pipeline: More general.
+ vlm-transformers: More general, but slower.
+ vlm-mlx-engine: Faster than transformers.
+ vlm-vllm-engine: Faster(engine).
+ vlm-http-client: Faster(client).
+ Without method specified, pipeline will be used by default.""",
default='pipeline',
)
@click.option(
diff --git a/mineru/cli/models_download.py b/mineru/cli/models_download.py
index e8c59a7c..2bb8922f 100644
--- a/mineru/cli/models_download.py
+++ b/mineru/cli/models_download.py
@@ -21,7 +21,7 @@ def download_and_modify_json(url, local_filename, modifications):
if os.path.exists(local_filename):
data = json.load(open(local_filename))
config_version = data.get('config_version', '0.0.0')
- if config_version < '1.3.0':
+ if config_version < '1.3.1':
data = download_json(url)
else:
data = download_json(url)