BabelDOC 0.4.7__tar.gz → 0.4.9__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.
- {babeldoc-0.4.7 → babeldoc-0.4.9}/.github/workflows/docs.yml +1 -1
- {babeldoc-0.4.7 → babeldoc-0.4.9}/.github/workflows/publish-to-pypi.yml +1 -1
- {babeldoc-0.4.7 → babeldoc-0.4.9}/.github/workflows/test.yml +1 -1
- {babeldoc-0.4.7 → babeldoc-0.4.9}/PKG-INFO +2 -1
- babeldoc-0.4.9/babeldoc/__init__.py +1 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/const.py +1 -1
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/typesetting.py +60 -2
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/utils/formular_helper.py +2 -2
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/glossary.py +6 -2
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/main.py +1 -1
- {babeldoc-0.4.7 → babeldoc-0.4.9}/pyproject.toml +4 -3
- {babeldoc-0.4.7 → babeldoc-0.4.9}/uv.lock +12 -1
- babeldoc-0.4.7/babeldoc/__init__.py +0 -1
- {babeldoc-0.4.7 → babeldoc-0.4.9}/.cursorignore +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/.github/ISSUE_TEMPLATE/bug_report.yaml +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/.github/PULL_REQUEST_TEMPLATE/pr_form.yml +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/.github/dependabot.yml +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/.github/labels.yml +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/.github/release-drafter.yml +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/.github/workflows/codeql.yml +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/.github/workflows/labeler.yml +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/.github/workflows/lint.yml +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/.github/workflows/pr-lint.yml +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/.gitignore +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/.pre-commit-config.yaml +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/LICENSE +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/README.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/assets/assets.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/assets/embedding_assets_metadata.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/asynchronize/__init__.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/babeldoc_exception/BabelDOCException.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/babeldoc_exception/__init__.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/docvision/README.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/docvision/__init__.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/docvision/base_doclayout.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/docvision/doclayout.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/docvision/rpc_doclayout.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/docvision/rpc_doclayout2.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/docvision/table_detection/rapidocr.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/__init__.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/__init__.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/converter.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/__init__.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/backend/__init__.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/backend/pdf_creater.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/frontend/__init__.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/frontend/il_creater.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/il_version_1.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/il_version_1.rnc +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/il_version_1.rng +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/il_version_1.xsd +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/__init__.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/add_debug_information.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/automatic_term_extractor.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/detect_scanned_file.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/il_translator.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/il_translator_llm_only.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/layout_parser.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/paragraph_finder.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/remove_descent.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/styles_and_formulas.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/table_parser.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/utils/__init__.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/utils/fontmap.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/utils/layout_helper.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/utils/mupdf_helper.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/utils/paragraph_helper.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/utils/style_helper.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/utils/zstd_helper.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/xml_converter.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/high_level.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/pdfinterp.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/result_merger.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/split_manager.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/translation_config.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/LICENSE +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/__init__.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/_saslprep.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/arcfour.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/ascii85.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/casting.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/ccitt.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/78-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/78-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/78-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/78-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/78-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/78-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/78ms-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/78ms-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/83pv-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/83pv-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/90ms-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/90ms-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/90msp-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/90msp-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/90pv-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/90pv-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/Add-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/Add-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/Add-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/Add-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/B5-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/B5-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/B5pc-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/B5pc-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/CNS-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/CNS-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/CNS1-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/CNS1-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/CNS2-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/CNS2-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/ETHK-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/ETHK-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/ETen-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/ETen-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/ETenms-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/ETenms-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/Ext-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/Ext-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/Ext-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/Ext-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GB-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GB-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GB-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GB-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GBK-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GBK-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GBK2K-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GBK2K-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GBKp-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GBKp-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GBT-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GBT-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GBT-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GBT-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GBTpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GBTpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GBpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/GBpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/HKdla-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/HKdla-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/HKdlb-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/HKdlb-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/HKgccs-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/HKgccs-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/HKm314-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/HKm314-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/HKm471-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/HKm471-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/HKscs-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/HKscs-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/Hankaku-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/Hankaku-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/Hiragana-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/Hiragana-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/KSC-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/KSC-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/KSC-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/KSC-Johab-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/KSC-Johab-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/KSC-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/KSCms-UHC-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/KSCms-UHC-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/KSCpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/KSCpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/Katakana-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/Katakana-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/NWP-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/NWP-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/README.txt +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/Roman-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/Roman-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniCNS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniCNS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniCNS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniCNS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniCNS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniCNS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniCNS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniCNS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniGB-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniGB-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniGB-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniGB-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniGB-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniGB-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniGB-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniGB-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJIS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJIS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJIS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJIS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJIS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJIS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJIS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJIS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniKS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniKS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniKS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniKS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniKS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniKS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniKS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/UniKS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/WP-Symbol-H.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/WP-Symbol-V.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/to-unicode-Adobe-CNS1.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/to-unicode-Adobe-GB1.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Japan1.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Korea1.pickle.gz +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/cmapdb.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/converter.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/data_structures.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/encodingdb.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/fontmetrics.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/glyphlist.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/high_level.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/image.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/jbig2.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/latin_enc.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/layout.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/lzw.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/pdfcolor.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/pdfdevice.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/pdfdocument.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/pdfexceptions.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/pdffont.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/pdfinterp.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/pdfpage.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/pdfparser.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/pdftypes.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/psexceptions.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/psparser.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/py.typed +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/runlength.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/settings.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/pdfminer/utils.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/progress_monitor.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/tools/generate_font_metadata.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/tools/italic_assistance.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/tools/italic_recognize_tool.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/translator/__init__.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/translator/cache.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/translator/translator.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/utils/__init__.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/utils/atomic_integer.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/utils/priority_thread_pool_executor.py +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/CODE_OF_CONDUCT.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/CONTRIBUTING.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/CONTRIBUTOR_REWARD.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/ImplementationDetails/AsyncTranslate/AsyncTranslate.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/ImplementationDetails/ILTranslator/ILTranslator.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/ImplementationDetails/PDFCreation/PDFCreation.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/ImplementationDetails/PDFParsing/PDFParsing.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/ImplementationDetails/ParagraphFinding/ParagraphFinding.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/ImplementationDetails/README.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/ImplementationDetails/StylesAndFormulas/StylesAndFormulas.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/ImplementationDetails/Typesetting/Typesetting.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/README.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/deploy.sh +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/example/demo_glossary.csv +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/images/babeldoc-banner.png +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.png +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.svg +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/images/babeldoc-big-logo-with-transparent-background.png +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/images/babeldoc-big-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/images/babeldoc-big-logo.png +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/images/babeldoc-contributor_reward_example.png +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/images/babeldoc-preview.gif +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/images/babeldoc-small-logo-with-transparent-background.png +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/images/babeldoc-small-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/images/babeldoc-small-logo.png +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/index.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/intro-to-pdf-object.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/requirements.txt +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/docs/supported_languages.md +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/mkdocs.yml +0 -0
- {babeldoc-0.4.7 → babeldoc-0.4.9}/tests/test_translation_config.py +0 -0
|
@@ -17,7 +17,7 @@ jobs:
|
|
|
17
17
|
git config user.name github-actions[bot]
|
|
18
18
|
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
19
19
|
- name: Setup uv with Python 3.12
|
|
20
|
-
uses: astral-sh/setup-uv@
|
|
20
|
+
uses: astral-sh/setup-uv@445689ea25e0de0a23313031f5fe577c74ae45a1 # v6.3.0
|
|
21
21
|
with:
|
|
22
22
|
python-version: "3.12"
|
|
23
23
|
enable-cache: true
|
|
@@ -35,7 +35,7 @@ jobs:
|
|
|
35
35
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
36
36
|
|
|
37
37
|
- name: Setup uv with Python 3.12
|
|
38
|
-
uses: astral-sh/setup-uv@
|
|
38
|
+
uses: astral-sh/setup-uv@445689ea25e0de0a23313031f5fe577c74ae45a1 # v6.3.0
|
|
39
39
|
with:
|
|
40
40
|
python-version: "3.12"
|
|
41
41
|
enable-cache: true
|
|
@@ -28,7 +28,7 @@ jobs:
|
|
|
28
28
|
path: ~/.cache/babeldoc
|
|
29
29
|
key: babeldoc-assets-${{ hashFiles('babeldoc/assets/embedding_assets_metadata.py') }}
|
|
30
30
|
- name: Setup uv with Python ${{ matrix.python-version }}
|
|
31
|
-
uses: astral-sh/setup-uv@
|
|
31
|
+
uses: astral-sh/setup-uv@445689ea25e0de0a23313031f5fe577c74ae45a1 # v6.3.0
|
|
32
32
|
with:
|
|
33
33
|
python-version: ${{ matrix.python-version }}
|
|
34
34
|
enable-cache: true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: BabelDOC
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.9
|
|
4
4
|
Summary: Yet Another Document Translator
|
|
5
5
|
Project-URL: Homepage, https://github.com/funstory-ai/BabelDOC
|
|
6
6
|
Project-URL: Issues, https://github.com/funstory-ai/BabelDOC/issues
|
|
@@ -13,6 +13,7 @@ Classifier: Operating System :: OS Independent
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Requires-Python: <3.14,>=3.10
|
|
15
15
|
Requires-Dist: bitstring>=4.3.0
|
|
16
|
+
Requires-Dist: chardet>=5.2.0
|
|
16
17
|
Requires-Dist: charset-normalizer>=2.0.0
|
|
17
18
|
Requires-Dist: configargparse>=1.7
|
|
18
19
|
Requires-Dist: cryptography>=36.0.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.9"
|
|
@@ -6,6 +6,7 @@ import unicodedata
|
|
|
6
6
|
from functools import cache
|
|
7
7
|
|
|
8
8
|
import pymupdf
|
|
9
|
+
from rtree import index
|
|
9
10
|
|
|
10
11
|
from babeldoc.const import WATERMARK_VERSION
|
|
11
12
|
from babeldoc.format.pdf.document_il import Box
|
|
@@ -16,6 +17,7 @@ from babeldoc.format.pdf.document_il import PdfStyle
|
|
|
16
17
|
from babeldoc.format.pdf.document_il import il_version_1
|
|
17
18
|
from babeldoc.format.pdf.document_il.utils.fontmap import FontMapper
|
|
18
19
|
from babeldoc.format.pdf.document_il.utils.formular_helper import update_formula_data
|
|
20
|
+
from babeldoc.format.pdf.document_il.utils.layout_helper import box_to_tuple
|
|
19
21
|
from babeldoc.format.pdf.translation_config import TranslationConfig
|
|
20
22
|
from babeldoc.format.pdf.translation_config import WatermarkOutputMode
|
|
21
23
|
|
|
@@ -592,6 +594,62 @@ class Typesetting:
|
|
|
592
594
|
== WatermarkOutputMode.Watermarked
|
|
593
595
|
):
|
|
594
596
|
self.add_watermark(page)
|
|
597
|
+
try:
|
|
598
|
+
para_index = index.Index()
|
|
599
|
+
para_map = {}
|
|
600
|
+
#
|
|
601
|
+
valid_paras = [
|
|
602
|
+
p
|
|
603
|
+
for p in page.pdf_paragraph
|
|
604
|
+
if p.box
|
|
605
|
+
and all(c is not None for c in [p.box.x, p.box.y, p.box.x2, p.box.y2])
|
|
606
|
+
]
|
|
607
|
+
|
|
608
|
+
for i, para in enumerate(valid_paras):
|
|
609
|
+
para_map[i] = para
|
|
610
|
+
para_index.insert(i, box_to_tuple(para.box))
|
|
611
|
+
|
|
612
|
+
for i, p_upper in para_map.items():
|
|
613
|
+
required_gap = 6
|
|
614
|
+
if not (p_upper.box and p_upper.box.y is not None):
|
|
615
|
+
continue
|
|
616
|
+
|
|
617
|
+
check_area = il_version_1.Box(
|
|
618
|
+
x=p_upper.box.x,
|
|
619
|
+
y=p_upper.box.y - required_gap,
|
|
620
|
+
x2=p_upper.box.x2,
|
|
621
|
+
y2=p_upper.box.y,
|
|
622
|
+
)
|
|
623
|
+
|
|
624
|
+
candidate_ids = list(para_index.intersection(box_to_tuple(check_area)))
|
|
625
|
+
|
|
626
|
+
conflicting_paras = []
|
|
627
|
+
for para_id in candidate_ids:
|
|
628
|
+
if para_id == i:
|
|
629
|
+
continue
|
|
630
|
+
p_lower = para_map[para_id]
|
|
631
|
+
if not (
|
|
632
|
+
p_lower.box
|
|
633
|
+
and p_upper.box
|
|
634
|
+
and p_lower.box.x2 < p_upper.box.x
|
|
635
|
+
or p_lower.box.x > p_upper.box.x2
|
|
636
|
+
):
|
|
637
|
+
conflicting_paras.append(p_lower)
|
|
638
|
+
|
|
639
|
+
if conflicting_paras:
|
|
640
|
+
max_y2 = max(
|
|
641
|
+
p.box.y2
|
|
642
|
+
for p in conflicting_paras
|
|
643
|
+
if p.box and p.box.y2 is not None
|
|
644
|
+
)
|
|
645
|
+
|
|
646
|
+
new_y = max_y2 + required_gap
|
|
647
|
+
if p_upper.box and new_y < p_upper.box.y2:
|
|
648
|
+
p_upper.box.y = new_y
|
|
649
|
+
except Exception as e:
|
|
650
|
+
logger.warning(
|
|
651
|
+
f"Failed to adjust paragraph positions on page {page.page_number}: {e}"
|
|
652
|
+
)
|
|
595
653
|
# 开始实际的渲染过程
|
|
596
654
|
for paragraph in page.pdf_paragraph:
|
|
597
655
|
self.render_paragraph(paragraph, page, fonts)
|
|
@@ -887,7 +945,7 @@ class Typesetting:
|
|
|
887
945
|
if scale < 0.7 and min_line_spacing > 1.1:
|
|
888
946
|
if expand_space_flag == 0:
|
|
889
947
|
# 先尝试向下扩展
|
|
890
|
-
min_y = self.get_max_bottom_space(box, page)
|
|
948
|
+
min_y = self.get_max_bottom_space(box, page) + 2
|
|
891
949
|
if min_y < box.y:
|
|
892
950
|
expanded_box = Box(
|
|
893
951
|
x=box.x,
|
|
@@ -902,7 +960,7 @@ class Typesetting:
|
|
|
902
960
|
continue
|
|
903
961
|
elif expand_space_flag == 1:
|
|
904
962
|
# 如果向下扩展后还不够,再尝试向右扩展
|
|
905
|
-
max_x = self.get_max_right_space(box, page)
|
|
963
|
+
max_x = self.get_max_right_space(box, page) - 5
|
|
906
964
|
if max_x > box.x2:
|
|
907
965
|
expanded_box = Box(
|
|
908
966
|
x=box.x,
|
|
@@ -197,8 +197,8 @@ def is_formulas_font(font_name: str, formular_font_pattern: str | None) -> bool:
|
|
|
197
197
|
)
|
|
198
198
|
precise_formula_font_pattern = (
|
|
199
199
|
r"^("
|
|
200
|
-
r"|.*CambriaMath.*"
|
|
201
|
-
r"|.*Cambria Math.*"
|
|
200
|
+
# r"|.*CambriaMath.*"
|
|
201
|
+
# r"|.*Cambria Math.*"
|
|
202
202
|
r"|.*Asana.*"
|
|
203
203
|
r"|.*MiriamMonoCLM-BookOblique.*"
|
|
204
204
|
r"|.*Miriam Mono CLM.*"
|
|
@@ -6,6 +6,7 @@ import re
|
|
|
6
6
|
import time
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
|
|
9
|
+
import chardet
|
|
9
10
|
import hyperscan
|
|
10
11
|
import regex
|
|
11
12
|
|
|
@@ -134,8 +135,11 @@ class Glossary:
|
|
|
134
135
|
normalized_target_lang_out = target_lang_out.lower().replace("-", "_")
|
|
135
136
|
|
|
136
137
|
try:
|
|
137
|
-
with file_path.open("
|
|
138
|
-
|
|
138
|
+
with file_path.open("rb") as f:
|
|
139
|
+
content = f.read()
|
|
140
|
+
encoding = chardet.detect(content)["encoding"]
|
|
141
|
+
buffer = io.StringIO(content.decode(encoding))
|
|
142
|
+
reader = csv.DictReader(buffer, doublequote=True)
|
|
139
143
|
if not all(col in reader.fieldnames for col in ["source", "target"]):
|
|
140
144
|
raise ValueError(
|
|
141
145
|
f"CSV file {file_path} must contain 'source' and 'target' columns."
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "BabelDOC"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.9"
|
|
4
4
|
description = "Yet Another Document Translator"
|
|
5
5
|
license = "AGPL-3.0"
|
|
6
6
|
readme = "README.md"
|
|
@@ -47,7 +47,8 @@ dependencies = [
|
|
|
47
47
|
"rapidocr-onnxruntime>=1.4.4",
|
|
48
48
|
"pyzstd>=0.17.0",
|
|
49
49
|
"hyperscan>=0.7.13",
|
|
50
|
-
"rtree>=1.4.0"
|
|
50
|
+
"rtree>=1.4.0",
|
|
51
|
+
"chardet>=5.2.0",
|
|
51
52
|
]
|
|
52
53
|
|
|
53
54
|
[project.optional-dependencies]
|
|
@@ -157,7 +158,7 @@ pythonpath = [".", "src"]
|
|
|
157
158
|
testpaths = ["tests"]
|
|
158
159
|
|
|
159
160
|
[bumpver]
|
|
160
|
-
current_version = "0.4.
|
|
161
|
+
current_version = "0.4.9"
|
|
161
162
|
version_pattern = "MAJOR.MINOR.PATCH[.PYTAGNUM]"
|
|
162
163
|
|
|
163
164
|
[bumpver.file_patterns]
|
|
@@ -48,10 +48,11 @@ wheels = [
|
|
|
48
48
|
|
|
49
49
|
[[package]]
|
|
50
50
|
name = "babeldoc"
|
|
51
|
-
version = "0.4.
|
|
51
|
+
version = "0.4.9"
|
|
52
52
|
source = { editable = "." }
|
|
53
53
|
dependencies = [
|
|
54
54
|
{ name = "bitstring" },
|
|
55
|
+
{ name = "chardet" },
|
|
55
56
|
{ name = "charset-normalizer" },
|
|
56
57
|
{ name = "configargparse" },
|
|
57
58
|
{ name = "cryptography" },
|
|
@@ -114,6 +115,7 @@ dev = [
|
|
|
114
115
|
[package.metadata]
|
|
115
116
|
requires-dist = [
|
|
116
117
|
{ name = "bitstring", specifier = ">=4.3.0" },
|
|
118
|
+
{ name = "chardet", specifier = ">=5.2.0" },
|
|
117
119
|
{ name = "charset-normalizer", specifier = ">=2.0.0" },
|
|
118
120
|
{ name = "configargparse", specifier = ">=1.7" },
|
|
119
121
|
{ name = "cryptography", specifier = ">=36.0.0" },
|
|
@@ -368,6 +370,15 @@ wheels = [
|
|
|
368
370
|
{ url = "https://files.pythonhosted.org/packages/c5/55/51844dd50c4fc7a33b653bfaba4c2456f06955289ca770a5dbd5fd267374/cfgv-3.4.0-py2.py3-none-any.whl", hash = "sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9", size = 7249, upload-time = "2023-08-12T20:38:16.269Z" },
|
|
369
371
|
]
|
|
370
372
|
|
|
373
|
+
[[package]]
|
|
374
|
+
name = "chardet"
|
|
375
|
+
version = "5.2.0"
|
|
376
|
+
source = { registry = "https://pypi.org/simple" }
|
|
377
|
+
sdist = { url = "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz", hash = "sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7", size = 2069618, upload-time = "2023-08-01T19:23:02.662Z" }
|
|
378
|
+
wheels = [
|
|
379
|
+
{ url = "https://files.pythonhosted.org/packages/38/6f/f5fbc992a329ee4e0f288c1fe0e2ad9485ed064cac731ed2fe47dcc38cbf/chardet-5.2.0-py3-none-any.whl", hash = "sha256:e1cf59446890a00105fe7b7912492ea04b6e6f06d4b742b2c788469e34c82970", size = 199385, upload-time = "2023-08-01T19:23:00.661Z" },
|
|
380
|
+
]
|
|
381
|
+
|
|
371
382
|
[[package]]
|
|
372
383
|
name = "charset-normalizer"
|
|
373
384
|
version = "3.4.2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.4.7"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/add_debug_information.py
RENAMED
|
File without changes
|
{babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/automatic_term_extractor.py
RENAMED
|
File without changes
|
{babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/detect_scanned_file.py
RENAMED
|
File without changes
|
|
File without changes
|
{babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/il_translator_llm_only.py
RENAMED
|
File without changes
|
|
File without changes
|
{babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/paragraph_finder.py
RENAMED
|
File without changes
|
|
File without changes
|
{babeldoc-0.4.7 → babeldoc-0.4.9}/babeldoc/format/pdf/document_il/midend/styles_and_formulas.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|