BabelDOC 0.7.1__tar.gz → 0.8.1__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.7.1 → babeldoc-0.8.1}/PKG-INFO +15 -25
- {babeldoc-0.7.1 → babeldoc-0.8.1}/README.md +11 -11
- babeldoc-0.8.1/babeldoc/__init__.py +1 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/assets/embedding_assets_metadata.py +24 -8
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/asynchronize/__init__.py +14 -9
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/const.py +1 -1
- babeldoc-0.7.1/babeldoc/format/pdf/document_il/backend/pdf_creater.py → babeldoc-0.8.1/babeldoc/format/pdf/document_il/backend/pdf_assembler.py +171 -78
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/utils/extract_char.py +1 -1
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/utils/formular_helper.py +2 -2
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/high_level.py +184 -105
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/result_merger.py +38 -11
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/split_manager.py +2 -2
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/translation_config.py +136 -13
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/main.py +54 -4
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/rust_run_context.py +5 -4
- babeldoc-0.8.1/babeldoc/rust_scan_service.py +726 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/rust_writer_service.py +6 -2
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/babeldoc_adapter.py +21 -1
- babeldoc-0.8.1/babeldoc/utils/priority_thread_pool_executor.py +7 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/pyproject.toml +12 -23
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/Cargo.lock +35 -30
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/Cargo.toml +2 -2
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/font_core/src/lib.rs +53 -5
- {babeldoc-0.7.1/rust/il_types → babeldoc-0.8.1/rust/ir}/Cargo.toml +4 -2
- babeldoc-0.8.1/rust/ir/schema.dsl.rs +986 -0
- babeldoc-0.8.1/rust/ir/src/generated.rs +8651 -0
- babeldoc-0.8.1/rust/ir/src/graphic_ops.rs +517 -0
- babeldoc-0.8.1/rust/ir/src/known_wrong.rs +523 -0
- babeldoc-0.8.1/rust/ir/src/lib.rs +79 -0
- babeldoc-0.8.1/rust/ir/src/pools.rs +366 -0
- babeldoc-0.8.1/rust/ir_codegen/Cargo.toml +10 -0
- babeldoc-0.8.1/rust/ir_codegen/src/dsl.rs +662 -0
- babeldoc-0.8.1/rust/ir_codegen/src/emit.rs +450 -0
- babeldoc-0.8.1/rust/ir_codegen/src/lib.rs +10 -0
- babeldoc-0.8.1/rust/ir_codegen/src/main.rs +16 -0
- babeldoc-0.8.1/rust/ir_codegen/src/validate.rs +447 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/Cargo.toml +2 -4
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/expansion.rs +0 -2
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/fonts/maps.rs +1 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/fonts.rs +13 -8
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/lib.rs +783 -386
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/object_numbers.rs +0 -2
- babeldoc-0.8.1/rust/parser_core/src/ocr_signals.rs +655 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/page_access.rs +0 -10
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/page_rank.rs +0 -3
- babeldoc-0.8.1/rust/parser_core/src/pool.rs +78 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/projection.rs +234 -570
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/tokens.rs +27 -15
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/type3.rs +9 -10
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/valid_text.rs +0 -2
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/Cargo.toml +2 -3
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/lib.rs +6 -7
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/runtime/context.rs +18 -0
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/runtime/mod.rs +1 -1
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/runtime/shared_context.rs +59 -7
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/shared/formula_helper.rs +37 -63
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/shared/formula_patterns.rs +1 -1
- babeldoc-0.8.1/rust/pipeline_stages/src/shared/layout_helper.rs +1126 -0
- babeldoc-0.8.1/rust/pipeline_stages/src/shared/style.rs +46 -0
- babeldoc-0.8.1/rust/pipeline_stages/src/stages/add_debug_information.rs +380 -0
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/stages/cid_char.rs +15 -20
- babeldoc-0.8.1/rust/pipeline_stages/src/stages/invisible_text_filter.rs +737 -0
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/stages/layout_parser.rs +237 -186
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/stages/mod.rs +5 -1
- babeldoc-0.8.1/rust/pipeline_stages/src/stages/occluded_text_filter.rs +189 -0
- babeldoc-0.8.1/rust/pipeline_stages/src/stages/ocr_classification.rs +522 -0
- babeldoc-0.8.1/rust/pipeline_stages/src/stages/page_render_backend.rs +79 -0
- babeldoc-0.8.1/rust/pipeline_stages/src/stages/paragraph_finder.rs +936 -0
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/stages/paragraph_finder_inputs.rs +1 -1
- babeldoc-0.8.1/rust/pipeline_stages/src/stages/scan_detection.rs +329 -0
- babeldoc-0.8.1/rust/pipeline_stages/src/stages/styles_and_formulas.rs +1354 -0
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/stages/styles_and_formulas_config.rs +0 -2
- babeldoc-0.8.1/rust/pipeline_stages/src/stages/tree_metrics.rs +31 -0
- babeldoc-0.8.1/rust/pipeline_stages/src/stages/typesetting.rs +2310 -0
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/translation/glossary.rs +48 -15
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/translation/llm_only.rs +70 -6
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/translation/mod.rs +2 -2
- babeldoc-0.7.1/rust/p2_stages/src/translation/ordinary_translation.rs → babeldoc-0.8.1/rust/pipeline_stages/src/translation/ordinary.rs +519 -21
- babeldoc-0.8.1/rust/pipeline_stages/src/translation/paragraph_helpers.rs +318 -0
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/translation/python_semantics.rs +58 -3
- babeldoc-0.7.1/rust/p2_stages/src/translation/automatic_term_extractor.rs → babeldoc-0.8.1/rust/pipeline_stages/src/translation/term_extraction.rs +37 -2
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/translation/token_count.rs +0 -2
- {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/Cargo.toml +7 -12
- {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/callbacks/mod.rs +1 -1
- {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/callbacks/progress.rs +1 -1
- {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/font_mapper.rs +2 -2
- {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/formula_patterns.rs +2 -2
- {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/layout_parser.rs +23 -18
- babeldoc-0.8.1/rust/py_bridge/src/lib.rs +52 -0
- babeldoc-0.8.1/rust/py_bridge/src/occluded_text_filter.rs +290 -0
- babeldoc-0.8.1/rust/py_bridge/src/ocr_classification.rs +72 -0
- {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/parser.rs +20 -71
- babeldoc-0.8.1/rust/py_bridge/src/pipeline_runner.rs +1761 -0
- {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/priority_gate.rs +0 -2
- {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/production_stages.rs +114 -67
- babeldoc-0.8.1/rust/py_bridge/src/scan_detection.rs +406 -0
- {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/shared_context.rs +62 -2
- {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/stage_error.rs +1 -1
- {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/term_extractor.rs +9 -117
- babeldoc-0.8.1/rust/py_bridge/src/translation/llm_only.rs +1191 -0
- babeldoc-0.7.1/rust/p2_bridge/src/translation.rs → babeldoc-0.8.1/rust/py_bridge/src/translation/mod.rs +4 -1
- babeldoc-0.8.1/rust/py_bridge/src/translation/ordinary.rs +1931 -0
- {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/translation_service.rs +1 -1
- {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/writer.rs +95 -161
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/writer_core/Cargo.toml +1 -3
- babeldoc-0.8.1/rust/writer_core/src/content.rs +3115 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/writer_core/src/fonts.rs +314 -93
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/writer_core/src/lib.rs +3 -8
- babeldoc-0.8.1/rust/writer_core/src/pdf.rs +1690 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/writer_core/src/retry.rs +6 -2
- babeldoc-0.7.1/babeldoc/__init__.py +0 -1
- babeldoc-0.7.1/babeldoc/format/pdf/document_il/il_version_1.rnc +0 -244
- babeldoc-0.7.1/babeldoc/format/pdf/document_il/il_version_1.rng +0 -670
- babeldoc-0.7.1/babeldoc/format/pdf/document_il/il_version_1.xsd +0 -383
- babeldoc-0.7.1/babeldoc/rust_scan_service.py +0 -103
- babeldoc-0.7.1/babeldoc/utils/priority_thread_pool_executor.py +0 -269
- babeldoc-0.7.1/rust/il_types/build.rs +0 -23
- babeldoc-0.7.1/rust/il_types/src/lib.rs +0 -256
- babeldoc-0.7.1/rust/il_types/src/python_value.rs +0 -217
- babeldoc-0.7.1/rust/ir_core/Cargo.toml +0 -14
- babeldoc-0.7.1/rust/ir_core/build.rs +0 -26
- babeldoc-0.7.1/rust/ir_core/src/compact.rs +0 -268
- babeldoc-0.7.1/rust/ir_core/src/compact_values.rs +0 -153
- babeldoc-0.7.1/rust/ir_core/src/lib.rs +0 -1205
- babeldoc-0.7.1/rust/p2_bridge/build.rs +0 -30
- babeldoc-0.7.1/rust/p2_bridge/src/lib.rs +0 -134
- babeldoc-0.7.1/rust/p2_bridge/src/llm_only_translation.rs +0 -952
- babeldoc-0.7.1/rust/p2_bridge/src/m_transfer.rs +0 -1080
- babeldoc-0.7.1/rust/p2_bridge/src/ordinary_translation.rs +0 -2017
- babeldoc-0.7.1/rust/p2_bridge/src/python_value.rs +0 -144
- babeldoc-0.7.1/rust/p2_bridge/src/scan_detection.rs +0 -292
- babeldoc-0.7.1/rust/p2_stages/src/shared/layout_helper.rs +0 -1056
- babeldoc-0.7.1/rust/p2_stages/src/shared/style.rs +0 -54
- babeldoc-0.7.1/rust/p2_stages/src/stages/add_debug_information.rs +0 -263
- babeldoc-0.7.1/rust/p2_stages/src/stages/detect_scanned_file.rs +0 -233
- babeldoc-0.7.1/rust/p2_stages/src/stages/paragraph_finder.rs +0 -995
- babeldoc-0.7.1/rust/p2_stages/src/stages/styles_and_formulas.rs +0 -1190
- babeldoc-0.7.1/rust/p2_stages/src/stages/tree_metrics.rs +0 -111
- babeldoc-0.7.1/rust/p2_stages/src/stages/typesetting.rs +0 -1708
- babeldoc-0.7.1/rust/p2_stages/src/translation/paragraph_helpers.rs +0 -192
- babeldoc-0.7.1/rust/parser_core/src/pool.rs +0 -68
- babeldoc-0.7.1/rust/writer_core/src/codecs.rs +0 -81
- babeldoc-0.7.1/rust/writer_core/src/content.rs +0 -935
- babeldoc-0.7.1/rust/writer_core/src/pdf.rs +0 -401
- babeldoc-0.7.1/scripts/generate_il_rust.py +0 -229
- babeldoc-0.7.1/scripts/il_rust_m.py +0 -867
- babeldoc-0.7.1/scripts/il_rust_m_declarations.py +0 -125
- {babeldoc-0.7.1 → babeldoc-0.8.1}/LICENSE +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/assets/assets.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/babeldoc_exception/BabelDOCException.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/babeldoc_exception/__init__.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/README.md +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/__init__.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/base_doclayout.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/doclayout.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/rpc_doclayout.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/rpc_doclayout2.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/rpc_doclayout3.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/rpc_doclayout4.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/rpc_doclayout5.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/rpc_doclayout6.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/rpc_doclayout7.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/rpc_doclayout8.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/docvision/table_detection/rapidocr.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/__init__.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/__init__.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/babelpdf/cidfont.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/babelpdf/cmap.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/babelpdf/encoding.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/__init__.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/backend/__init__.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/frontend/__init__.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/frontend/il_creater_active_support.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/il_version_1.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/midend/__init__.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/utils/__init__.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/utils/fontmap.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/utils/layout_helper.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/utils/mupdf_helper.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/utils/raster_geometry.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/document_il/xml_converter.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/parser_errors.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/format/pdf/parser_resource.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/glossary.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/progress_monitor.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/rust_callback_bridge.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/rust_debug_service.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/rust_layout_service.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/rust_parser_service.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/rust_translation_service.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/__init__.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/__main__.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/protocol.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/runner.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/server.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/state.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/translator.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/watermark_transform.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/executor/workroot.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/generate_cmap_metadata.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/generate_font_metadata.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/italic_assistance.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/tools/italic_recognize_tool.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/translator/__init__.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/translator/cache.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/translator/translator.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/utils/__init__.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/utils/atomic_integer.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/babeldoc/utils/memory.py +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/font_core/Cargo.lock +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/font_core/Cargo.toml +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/font_core/src/bin/font_core_probe.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/font_core/src/missing_widths.bin +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/font_core/src/pdf_font_flags.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/.gitignore +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/LICENSE-ADOBE-AFM.txt +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/LICENSE-ADOBE-CMAPS.txt +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/LICENSE-ADOBE-GLYPHLIST.txt +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/base14.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/78-EUC-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/78-EUC-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/78-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/78-RKSJ-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/78-RKSJ-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/78-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/78ms-RKSJ-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/78ms-RKSJ-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/83pv-RKSJ-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/83pv-RKSJ-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/90ms-RKSJ-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/90ms-RKSJ-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/90msp-RKSJ-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/90msp-RKSJ-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/90pv-RKSJ-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/90pv-RKSJ-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Add-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Add-RKSJ-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Add-RKSJ-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Add-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/B5-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/B5-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/B5pc-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/B5pc-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/CNS-EUC-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/CNS-EUC-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/CNS1-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/CNS1-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/CNS2-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/CNS2-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/ETHK-B5-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/ETHK-B5-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/ETen-B5-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/ETen-B5-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/ETenms-B5-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/ETenms-B5-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/EUC-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/EUC-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Ext-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Ext-RKSJ-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Ext-RKSJ-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Ext-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GB-EUC-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GB-EUC-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GB-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GB-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBK-EUC-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBK-EUC-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBK2K-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBK2K-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBKp-EUC-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBKp-EUC-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBT-EUC-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBT-EUC-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBT-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBT-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBTpc-EUC-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBTpc-EUC-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBpc-EUC-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/GBpc-EUC-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKdla-B5-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKdla-B5-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKdlb-B5-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKdlb-B5-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKgccs-B5-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKgccs-B5-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKm314-B5-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKm314-B5-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKm471-B5-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKm471-B5-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKscs-B5-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/HKscs-B5-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Hankaku-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Hankaku-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Hiragana-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Hiragana-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSC-EUC-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSC-EUC-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSC-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSC-Johab-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSC-Johab-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSC-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSCms-UHC-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSCms-UHC-HW-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSCms-UHC-HW-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSCms-UHC-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSCpc-EUC-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/KSCpc-EUC-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Katakana-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Katakana-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/NWP-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/NWP-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/RKSJ-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/RKSJ-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Roman-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/Roman-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniCNS-UCS2-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniCNS-UCS2-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniCNS-UTF16-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniCNS-UTF16-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniCNS-UTF32-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniCNS-UTF32-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniCNS-UTF8-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniCNS-UTF8-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniGB-UCS2-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniGB-UCS2-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniGB-UTF16-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniGB-UTF16-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniGB-UTF32-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniGB-UTF32-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniGB-UTF8-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniGB-UTF8-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UCS2-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UCS2-HW-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UCS2-HW-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UCS2-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UTF16-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UTF16-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UTF32-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UTF32-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UTF8-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS-UTF8-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS2004-UTF16-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS2004-UTF16-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS2004-UTF32-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS2004-UTF32-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS2004-UTF8-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJIS2004-UTF8-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJISX0213-UTF32-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJISX0213-UTF32-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJISX02132004-UTF32-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniJISX02132004-UTF32-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniKS-UCS2-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniKS-UCS2-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniKS-UTF16-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniKS-UTF16-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniKS-UTF32-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniKS-UTF32-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniKS-UTF8-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/UniKS-UTF8-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/WP-Symbol-H.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/WP-Symbol-V.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/to-unicode-Adobe-CNS1.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/to-unicode-Adobe-GB1.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/to-unicode-Adobe-Japan1.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/cmap/to-unicode-Adobe-Korea1.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/font_tables.zst +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/fontmetrics.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/glyphlist.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/latin_enc.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/type1_encoding.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/assets/font_runtime/win_core.json +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/examples/object_numbers.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/examples/probe_prepared_font.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/font_cmap_data.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/src/valid_categories.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/parser_core/tools/build_font_asset_bundle.py +0 -0
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/font_mapper.rs +0 -0
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/runtime/config.rs +0 -0
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/runtime/run_state.rs +0 -0
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/shared/mod.rs +0 -0
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/shared/unicode.rs +0 -0
- {babeldoc-0.7.1/rust/p2_stages → babeldoc-0.8.1/rust/pipeline_stages}/src/shared/unicode_data.rs +0 -0
- {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/logging.rs +0 -0
- {babeldoc-0.7.1/rust/p2_bridge → babeldoc-0.8.1/rust/py_bridge}/src/run_context.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/rtree_compat/Cargo.toml +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/rtree_compat/src/lib.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/.editorconfig +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/.gitattributes +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/.gitignore +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/BABELDOC_PATCH.md +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/CHANGELOG.md +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/Cargo.toml +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/Cargo.toml.orig +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/LICENSE +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/README.md +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/rustfmt.toml +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/bookmarks.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/cmap_section.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/common_data_structures/mod.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/content.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/creator.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/datetime.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/destinations.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/document.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encodings/cmap.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encodings/differences.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encodings/glyphnames.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encodings/mappings.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encodings/mod.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encryption/algorithms.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encryption/crypt_filters.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encryption/pkcs5.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encryption/rc4.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/encryption.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/error.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/filters/mod.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/filters/png.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/font.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/incremental_document.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/lib.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/load_options.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/object.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/object_stream.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/outlines.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/parser/cmap_parser.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/parser/mod.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/parser_aux.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/processor.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/reader.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/reader_resource_v3_tests.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/resource.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/save_options.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/stream_content.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/toc.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/writer.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/xobject.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/src/xref.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/annotation.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/brotli_decode.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/catalog_compression_integration_test.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/decompression_bomb.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/decryption.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/document_load_performance.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/encrypted_object_stream_test.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/extract_test.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/font_test.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/incremental_document.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/linearized_objstm_test.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/load_options_test.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/metadata_test.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/modify.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/object_stream_comprehensive_test.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/object_stream_edge_cases_test.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/object_stream_methods_test.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/object_stream_performance_test.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/page_content.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/resource_compat_v2.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/save_options_xref_streams_test.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/simple_object_stream_test.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/stream_length_recovery.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/trailer_reference_compression_test.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/unicode.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/utils.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/xref_reconstruction.rs +0 -0
- {babeldoc-0.7.1 → babeldoc-0.8.1}/rust/vendor/lopdf/tests/xref_stream_bounds.rs +0 -0
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: BabelDOC
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.1
|
|
4
4
|
Classifier: Programming Language :: Python :: 3
|
|
5
5
|
Classifier: Operating System :: OS Independent
|
|
6
6
|
Requires-Dist: configargparse>=1.7
|
|
7
7
|
Requires-Dist: httpx[socks]>=0.27.0
|
|
8
|
-
Requires-Dist: huggingface-hub>=0.27.0
|
|
9
8
|
Requires-Dist: numpy>=2.0.2
|
|
10
9
|
Requires-Dist: onnx>=1.21.0
|
|
11
|
-
Requires-Dist: onnxruntime>=1.16.1
|
|
12
|
-
Requires-Dist: onnxruntime>=1.16.1 ; python_full_version >= '3.11'
|
|
10
|
+
Requires-Dist: onnxruntime>=1.16.1
|
|
13
11
|
Requires-Dist: openai>=1.59.3
|
|
14
12
|
Requires-Dist: orjson>=3.10.14
|
|
15
13
|
Requires-Dist: charset-normalizer>=2.0.0
|
|
@@ -20,35 +18,27 @@ Requires-Dist: pymupdf>=1.26.7,<2
|
|
|
20
18
|
Requires-Dist: rich>=13.9.4
|
|
21
19
|
Requires-Dist: toml>=0.10.2
|
|
22
20
|
Requires-Dist: tqdm>=4.67.1
|
|
23
|
-
Requires-Dist: xsdata
|
|
21
|
+
Requires-Dist: xsdata>=24.12
|
|
24
22
|
Requires-Dist: msgpack>=1.1.0
|
|
25
23
|
Requires-Dist: pydantic>=2.10.6
|
|
26
24
|
Requires-Dist: tenacity>=9.0.0
|
|
27
25
|
Requires-Dist: scikit-image>=0.25.2
|
|
28
26
|
Requires-Dist: freetype-py>=2.5.1
|
|
29
27
|
Requires-Dist: tiktoken>=0.9.0
|
|
30
|
-
Requires-Dist: levenshtein>=0.27.1
|
|
31
28
|
Requires-Dist: opencv-python-headless>=4.10.0.84
|
|
32
|
-
Requires-Dist: pyzstd>=0.17.0
|
|
33
29
|
Requires-Dist: hyperscan>=0.7.13
|
|
34
|
-
Requires-Dist: rtree>=1.4.0
|
|
35
30
|
Requires-Dist: chardet>=5.2.0
|
|
36
31
|
Requires-Dist: scipy>=1.15.3
|
|
37
|
-
Requires-Dist: uharfbuzz>=0.50.2
|
|
38
32
|
Requires-Dist: scikit-learn>=1.7.1
|
|
39
|
-
Requires-Dist: onnxruntime-gpu>=1.16.1 ; extra == 'cuda'
|
|
40
33
|
Requires-Dist: onnxruntime-directml>=1.16.1 ; extra == 'directml'
|
|
41
|
-
Requires-Dist: memray>=1.17.1 ; extra == 'memray'
|
|
42
|
-
Provides-Extra: cuda
|
|
43
34
|
Provides-Extra: directml
|
|
44
|
-
Provides-Extra: memray
|
|
45
35
|
License-File: LICENSE
|
|
46
36
|
Summary: Yet Another Document Translator
|
|
47
37
|
Keywords: PDF
|
|
48
38
|
Author-email: awwaawwa <aw@funstory.ai>
|
|
49
39
|
Maintainer-email: awwaawwa <aw@funstory.ai>
|
|
50
40
|
License-Expression: AGPL-3.0
|
|
51
|
-
Requires-Python: >=3.
|
|
41
|
+
Requires-Python: >=3.11, <3.15
|
|
52
42
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
53
43
|
Project-URL: Homepage, https://github.com/funstory-ai/BabelDOC
|
|
54
44
|
Project-URL: Issues, https://github.com/funstory-ai/BabelDOC/issues
|
|
@@ -481,22 +471,22 @@ step by step.
|
|
|
481
471
|
|
|
482
472
|
<h2 id="star_hist">Star History</h2>
|
|
483
473
|
|
|
484
|
-
<a href="https://star-history.
|
|
474
|
+
<a href="https://star-history.dera.page/#funstory-ai/babeldoc&type=Date">
|
|
485
475
|
<picture>
|
|
486
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://
|
|
487
|
-
<source media="(prefers-color-scheme: light)" srcset="https://
|
|
488
|
-
<img alt="Star History Chart" src="https://
|
|
476
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://star-history.dera.page/svg?repos=funstory-ai/babeldoc&type=Date&theme=dark" />
|
|
477
|
+
<source media="(prefers-color-scheme: light)" srcset="https://star-history.dera.page/svg?repos=funstory-ai/babeldoc&type=Date" />
|
|
478
|
+
<img alt="Star History Chart" src="https://star-history.dera.page/svg?repos=funstory-ai/babeldoc&type=Date"/>
|
|
489
479
|
</picture>
|
|
490
480
|
</a>
|
|
491
481
|
|
|
492
|
-
> [!
|
|
493
|
-
> **
|
|
482
|
+
> [!NOTE]
|
|
483
|
+
> **OCR Mode (`--ocr-mode`) and Legacy Flag Precedence (v0.8.0+):**
|
|
494
484
|
>
|
|
495
|
-
>
|
|
485
|
+
> BabelDOC uses a unified tri-state `ocr_mode` (`"auto"`, `"on"`, `"off"`), defaulting to `"auto"`:
|
|
496
486
|
>
|
|
497
|
-
> 1.
|
|
498
|
-
> 2.
|
|
499
|
-
>
|
|
487
|
+
> 1. `ocr_mode="auto"` (default): automatically classifies scanned / OCR text layers per paragraph, and raises `ScannedPDFError` if at least 80% of selected pages in the scan check are scanned without usable text (unless `skip_scanned_detection=True` is also set).
|
|
488
|
+
> 2. `ocr_mode="on"`: forces OCR handling, skips scanned-PDF rejection, and disables rich-text translation.
|
|
489
|
+
> 3. `ocr_mode="off"`: skips scanned-PDF rejection and disables OCR masking.
|
|
500
490
|
>
|
|
501
|
-
>
|
|
491
|
+
> When `ocr_mode` is omitted, legacy boolean flags resolve in priority order: `ocr_workaround=True` selects `"on"` (taking precedence even if `auto_enable_ocr_workaround=True` is also set), followed by `auto_enable_ocr_workaround=True` (`"auto"`), then `skip_scanned_detection=True` (`"off"`), and default `"auto"` when none are enabled.
|
|
502
492
|
|
|
@@ -426,21 +426,21 @@ step by step.
|
|
|
426
426
|
|
|
427
427
|
<h2 id="star_hist">Star History</h2>
|
|
428
428
|
|
|
429
|
-
<a href="https://star-history.
|
|
429
|
+
<a href="https://star-history.dera.page/#funstory-ai/babeldoc&type=Date">
|
|
430
430
|
<picture>
|
|
431
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://
|
|
432
|
-
<source media="(prefers-color-scheme: light)" srcset="https://
|
|
433
|
-
<img alt="Star History Chart" src="https://
|
|
431
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://star-history.dera.page/svg?repos=funstory-ai/babeldoc&type=Date&theme=dark" />
|
|
432
|
+
<source media="(prefers-color-scheme: light)" srcset="https://star-history.dera.page/svg?repos=funstory-ai/babeldoc&type=Date" />
|
|
433
|
+
<img alt="Star History Chart" src="https://star-history.dera.page/svg?repos=funstory-ai/babeldoc&type=Date"/>
|
|
434
434
|
</picture>
|
|
435
435
|
</a>
|
|
436
436
|
|
|
437
|
-
> [!
|
|
438
|
-
> **
|
|
437
|
+
> [!NOTE]
|
|
438
|
+
> **OCR Mode (`--ocr-mode`) and Legacy Flag Precedence (v0.8.0+):**
|
|
439
439
|
>
|
|
440
|
-
>
|
|
440
|
+
> BabelDOC uses a unified tri-state `ocr_mode` (`"auto"`, `"on"`, `"off"`), defaulting to `"auto"`:
|
|
441
441
|
>
|
|
442
|
-
> 1.
|
|
443
|
-
> 2.
|
|
444
|
-
>
|
|
442
|
+
> 1. `ocr_mode="auto"` (default): automatically classifies scanned / OCR text layers per paragraph, and raises `ScannedPDFError` if at least 80% of selected pages in the scan check are scanned without usable text (unless `skip_scanned_detection=True` is also set).
|
|
443
|
+
> 2. `ocr_mode="on"`: forces OCR handling, skips scanned-PDF rejection, and disables rich-text translation.
|
|
444
|
+
> 3. `ocr_mode="off"`: skips scanned-PDF rejection and disables OCR masking.
|
|
445
445
|
>
|
|
446
|
-
>
|
|
446
|
+
> When `ocr_mode` is omitted, legacy boolean flags resolve in priority order: `ocr_workaround=True` selects `"on"` (taking precedence even if `auto_enable_ocr_workaround=True` is also set), followed by `auto_enable_ocr_workaround=True` (`"auto"`), then `skip_scanned_detection=True` (`"off"`), and default `"auto"` when none are enabled.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.8.1"
|
|
@@ -16,17 +16,33 @@ FONT_METADATA_URL = {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
FONT_URL_BY_UPSTREAM = {
|
|
19
|
-
"github": lambda name:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
19
|
+
"github": lambda name: (
|
|
20
|
+
f"https://raw.githubusercontent.com/funstory-ai/BabelDOC-Assets/refs/heads/main/fonts/{name}"
|
|
21
|
+
),
|
|
22
|
+
"huggingface": lambda name: (
|
|
23
|
+
f"https://huggingface.co/datasets/awwaawwa/BabelDOC-Assets/resolve/main/fonts/{name}?download=true"
|
|
24
|
+
),
|
|
25
|
+
"hf-mirror": lambda name: (
|
|
26
|
+
f"https://hf-mirror.com/datasets/awwaawwa/BabelDOC-Assets/resolve/main/fonts/{name}?download=true"
|
|
27
|
+
),
|
|
28
|
+
"modelscope": lambda name: (
|
|
29
|
+
f"https://www.modelscope.cn/datasets/awwaawwa/BabelDOCAssets/resolve/master/fonts/{name}"
|
|
30
|
+
),
|
|
23
31
|
}
|
|
24
32
|
|
|
25
33
|
CMAP_URL_BY_UPSTREAM = {
|
|
26
|
-
"github": lambda name:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
34
|
+
"github": lambda name: (
|
|
35
|
+
f"https://raw.githubusercontent.com/funstory-ai/BabelDOC-Assets/refs/heads/main/cmap/{name}"
|
|
36
|
+
),
|
|
37
|
+
"huggingface": lambda name: (
|
|
38
|
+
f"https://huggingface.co/datasets/awwaawwa/BabelDOC-Assets/resolve/main/cmap/{name}?download=true"
|
|
39
|
+
),
|
|
40
|
+
"hf-mirror": lambda name: (
|
|
41
|
+
f"https://hf-mirror.com/datasets/awwaawwa/BabelDOC-Assets/resolve/main/cmap/{name}?download=true"
|
|
42
|
+
),
|
|
43
|
+
"modelscope": lambda name: (
|
|
44
|
+
f"https://www.modelscope.cn/datasets/awwaawwa/BabelDOCAssets/resolve/master/cmap/{name}"
|
|
45
|
+
),
|
|
30
46
|
}
|
|
31
47
|
|
|
32
48
|
DOC_LAYOUT_ONNX_MODEL_URL = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
-
import
|
|
2
|
+
import threading
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
class Args:
|
|
@@ -13,6 +13,8 @@ class AsyncCallback:
|
|
|
13
13
|
self.queue = asyncio.Queue()
|
|
14
14
|
self.finished = False
|
|
15
15
|
self.loop = asyncio.get_event_loop()
|
|
16
|
+
self._finish_lock = threading.Lock()
|
|
17
|
+
self._finish_scheduled = False
|
|
16
18
|
|
|
17
19
|
def step_callback(self, *args, **kwargs):
|
|
18
20
|
# Whenever a step is called, add to the queue but don't set finished to True, so __anext__ will continue
|
|
@@ -22,15 +24,18 @@ class AsyncCallback:
|
|
|
22
24
|
# https://stackoverflow.com/a/49912853/2148718
|
|
23
25
|
self.loop.call_soon_threadsafe(self.queue.put_nowait, args)
|
|
24
26
|
|
|
25
|
-
# Add a small delay to release the GIL, ensuring the event loop has time to process messages
|
|
26
|
-
time.sleep(0.01)
|
|
27
|
-
|
|
28
27
|
def finished_callback(self, *args, **kwargs):
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
# Enqueue the terminal event and expose finished together on the event loop. Otherwise a
|
|
29
|
+
# consumer can observe finished with an empty queue before the scheduled enqueue runs.
|
|
30
|
+
with self._finish_lock:
|
|
31
|
+
if self._finish_scheduled:
|
|
32
|
+
return
|
|
33
|
+
self._finish_scheduled = True
|
|
34
|
+
terminal_args = Args(args, kwargs)
|
|
35
|
+
self.loop.call_soon_threadsafe(self._enqueue_finish, terminal_args)
|
|
36
|
+
|
|
37
|
+
def _enqueue_finish(self, args):
|
|
38
|
+
self.queue.put_nowait(args)
|
|
34
39
|
self.finished = True
|
|
35
40
|
|
|
36
41
|
def __await__(self):
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import io
|
|
2
1
|
import itertools
|
|
3
2
|
import logging
|
|
4
3
|
import os
|
|
@@ -8,7 +7,6 @@ import unicodedata
|
|
|
8
7
|
from multiprocessing import Process
|
|
9
8
|
from pathlib import Path
|
|
10
9
|
|
|
11
|
-
import freetype
|
|
12
10
|
import pymupdf
|
|
13
11
|
|
|
14
12
|
from babeldoc.assets.embedding_assets_metadata import FONT_NAMES
|
|
@@ -22,28 +20,35 @@ _EXTGSTATE_USAGE_RE = re.compile(rb"/([!#$%&'*+,\-.0-9:;=?@A-Z\\^_`a-z{|}~]+)\s+
|
|
|
22
20
|
_SHADING_USAGE_RE = re.compile(rb"/([!#$%&'*+,\-.0-9:;=?@A-Z\\^_`a-z{|}~]+)\s+sh\b")
|
|
23
21
|
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
_BFRANGE_BLOCK_RE = re.compile(
|
|
24
|
+
rb"(?:^|\s)beginbfrange\b(?P<r>.*?)(?:^|\s)endbfrange\b",
|
|
25
|
+
re.DOTALL,
|
|
26
|
+
)
|
|
27
|
+
_BFRANGE_ENTRY_RE = re.compile(
|
|
28
|
+
rb"<(?P<start>[0-9a-fA-F]+)>\s*<(?P<stop>[0-9a-fA-F]+)>\s*(?:\[(?P<arr>[^\]]*)\]|<(?P<dst>[0-9a-fA-F]+)>)"
|
|
29
|
+
)
|
|
30
|
+
_BFCHAR_BLOCK_RE = re.compile(
|
|
31
|
+
rb"(?:^|\s)beginbfchar\b(?P<c>.*?)(?:^|\s)endbfchar\b",
|
|
32
|
+
re.DOTALL,
|
|
33
|
+
)
|
|
34
|
+
_HEX_TOKEN_RE = re.compile(rb"<([0-9a-fA-F]+)>")
|
|
27
35
|
|
|
28
36
|
|
|
29
|
-
def
|
|
30
|
-
|
|
31
|
-
for x in re.finditer(rb"<(?P<num>[a-fA-F0-9]+)>", text):
|
|
32
|
-
mapping.append(int(x.group("num"), 16))
|
|
33
|
-
return mapping
|
|
37
|
+
def to_int(src):
|
|
38
|
+
return int(re.search(r"\d+", src).group(0))
|
|
34
39
|
|
|
35
40
|
|
|
36
41
|
def apply_normalization(cmap, gid, code):
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
norm
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
if (
|
|
43
|
+
0x2F00 <= code <= 0x2FD5
|
|
44
|
+
or 0xF900 <= code <= 0xFAFF
|
|
45
|
+
or 0x2F800 <= code <= 0x2FA1F
|
|
46
|
+
):
|
|
47
|
+
norm = unicodedata.normalize("NFKC", chr(code))
|
|
48
|
+
if len(norm) == 1:
|
|
49
|
+
cmap[gid] = ord(norm)
|
|
50
|
+
return
|
|
51
|
+
cmap[gid] = code
|
|
47
52
|
|
|
48
53
|
|
|
49
54
|
def batched(iterable, n, *, strict=False):
|
|
@@ -57,41 +62,102 @@ def batched(iterable, n, *, strict=False):
|
|
|
57
62
|
yield batch
|
|
58
63
|
|
|
59
64
|
|
|
60
|
-
def
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
def _parse_cmap_dst(hex_bytes):
|
|
66
|
+
if len(hex_bytes) <= 4:
|
|
67
|
+
return int(hex_bytes, 16)
|
|
68
|
+
if 5 <= len(hex_bytes) <= 6:
|
|
69
|
+
val = int(hex_bytes, 16)
|
|
70
|
+
if 0x10000 <= val <= 0x10FFFF:
|
|
71
|
+
return val
|
|
72
|
+
if len(hex_bytes) == 8:
|
|
73
|
+
try:
|
|
74
|
+
decoded = bytes.fromhex(hex_bytes.decode("ascii")).decode(
|
|
75
|
+
"utf-16-be", errors="strict"
|
|
76
|
+
)
|
|
77
|
+
except UnicodeDecodeError:
|
|
78
|
+
decoded = ""
|
|
79
|
+
if len(decoded) == 1:
|
|
80
|
+
return ord(decoded)
|
|
81
|
+
return hex_bytes.decode("ascii").lower()
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def _increment_multicode_bfrange(dst: str, offset: int) -> str | None:
|
|
85
|
+
if len(dst) < 4 or len(dst) % 4 != 0:
|
|
86
|
+
return None
|
|
87
|
+
last_unit = int(dst[-4:], 16)
|
|
88
|
+
new_unit = last_unit + offset
|
|
89
|
+
if 0xD800 <= last_unit <= 0xDBFF:
|
|
90
|
+
return None
|
|
91
|
+
if 0xDC00 <= last_unit <= 0xDFFF:
|
|
92
|
+
if new_unit > 0xDFFF:
|
|
93
|
+
return None
|
|
94
|
+
elif new_unit > 0xFFFF or (last_unit < 0xD800 <= new_unit):
|
|
95
|
+
return None
|
|
96
|
+
return f"{dst[:-4]}{new_unit:04x}"
|
|
65
97
|
|
|
66
98
|
|
|
67
|
-
def
|
|
68
|
-
|
|
69
|
-
apply_normalization(cmap, gid,
|
|
99
|
+
def _store_cmap_entry(cmap, gid, dst):
|
|
100
|
+
if isinstance(dst, int):
|
|
101
|
+
apply_normalization(cmap, gid, dst)
|
|
102
|
+
else:
|
|
103
|
+
cmap[gid] = dst
|
|
70
104
|
|
|
71
105
|
|
|
72
106
|
def parse_tounicode_cmap(data):
|
|
107
|
+
cleaned = re.sub(rb"%[^\r\n]*", b"", data)
|
|
108
|
+
bfrange_blocks = list(_BFRANGE_BLOCK_RE.finditer(cleaned))
|
|
109
|
+
bfchar_blocks = list(_BFCHAR_BLOCK_RE.finditer(cleaned))
|
|
110
|
+
if len(bfrange_blocks) != len(
|
|
111
|
+
re.findall(rb"(?:^|\s)beginbfrange\b", cleaned)
|
|
112
|
+
) or len(bfchar_blocks) != len(re.findall(rb"(?:^|\s)beginbfchar\b", cleaned)):
|
|
113
|
+
return None
|
|
114
|
+
|
|
73
115
|
cmap = {}
|
|
74
|
-
for x in
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
116
|
+
for x in bfrange_blocks:
|
|
117
|
+
body = x.group("r")
|
|
118
|
+
if _BFRANGE_ENTRY_RE.sub(b"", body).strip():
|
|
119
|
+
return None
|
|
120
|
+
for entry in _BFRANGE_ENTRY_RE.finditer(body):
|
|
121
|
+
start = int(entry.group("start"), 16)
|
|
122
|
+
stop = int(entry.group("stop"), 16)
|
|
123
|
+
if stop < start:
|
|
124
|
+
return None
|
|
125
|
+
arr = entry.group("arr")
|
|
126
|
+
if arr is not None:
|
|
127
|
+
if _HEX_TOKEN_RE.sub(b"", arr).strip():
|
|
128
|
+
return None
|
|
129
|
+
for offset, dst_hex in enumerate(_HEX_TOKEN_RE.findall(arr)):
|
|
130
|
+
gid = start + offset
|
|
131
|
+
if gid > stop:
|
|
132
|
+
break
|
|
133
|
+
_store_cmap_entry(cmap, gid, _parse_cmap_dst(dst_hex))
|
|
134
|
+
else:
|
|
135
|
+
dst = _parse_cmap_dst(entry.group("dst"))
|
|
136
|
+
if isinstance(dst, int):
|
|
137
|
+
if dst + stop - start > 0x10FFFF:
|
|
138
|
+
return None
|
|
139
|
+
for gid in range(start, stop + 1):
|
|
140
|
+
apply_normalization(cmap, gid, dst + gid - start)
|
|
141
|
+
elif start == stop:
|
|
142
|
+
cmap[start] = dst
|
|
143
|
+
else:
|
|
144
|
+
for gid in range(start, stop + 1):
|
|
145
|
+
incremented = _increment_multicode_bfrange(dst, gid - start)
|
|
146
|
+
if incremented is None:
|
|
147
|
+
return None
|
|
148
|
+
cmap[gid] = incremented
|
|
149
|
+
for x in bfchar_blocks:
|
|
150
|
+
body = x.group("c")
|
|
151
|
+
if _HEX_TOKEN_RE.sub(b"", body).strip():
|
|
152
|
+
return None
|
|
153
|
+
tokens = _HEX_TOKEN_RE.findall(body)
|
|
154
|
+
if len(tokens) % 2 != 0:
|
|
155
|
+
return None
|
|
156
|
+
for gid_hex, dst_hex in batched(tokens, 2):
|
|
157
|
+
_store_cmap_entry(cmap, int(gid_hex, 16), _parse_cmap_dst(dst_hex))
|
|
82
158
|
return cmap
|
|
83
159
|
|
|
84
160
|
|
|
85
|
-
def parse_truetype_data(data):
|
|
86
|
-
glyph_in_use = []
|
|
87
|
-
face = freetype.Face(io.BytesIO(data))
|
|
88
|
-
for i in range(face.num_glyphs):
|
|
89
|
-
face.load_glyph(i)
|
|
90
|
-
if face.glyph.outline.contours:
|
|
91
|
-
glyph_in_use.append(i)
|
|
92
|
-
return glyph_in_use
|
|
93
|
-
|
|
94
|
-
|
|
95
161
|
TOUNICODE_HEAD = """\
|
|
96
162
|
/CIDInit /ProcSet findresource begin
|
|
97
163
|
12 dict begin
|
|
@@ -110,16 +176,15 @@ end
|
|
|
110
176
|
end"""
|
|
111
177
|
|
|
112
178
|
|
|
113
|
-
def make_tounicode(cmap
|
|
114
|
-
short =
|
|
115
|
-
for x in used:
|
|
116
|
-
if x in cmap:
|
|
117
|
-
short.append((x, cmap[x]))
|
|
179
|
+
def make_tounicode(cmap):
|
|
180
|
+
short = sorted(cmap.items())
|
|
118
181
|
line = [TOUNICODE_HEAD]
|
|
119
182
|
for block in batched(short, 100):
|
|
120
183
|
line.append(f"{len(block)} beginbfchar")
|
|
121
184
|
for glyph, code in block:
|
|
122
|
-
if code
|
|
185
|
+
if isinstance(code, str):
|
|
186
|
+
line.append(f"<{glyph:04x}><{code}>")
|
|
187
|
+
elif code < 0x10000:
|
|
123
188
|
line.append(f"<{glyph:04x}><{code:04x}>")
|
|
124
189
|
else:
|
|
125
190
|
code -= 0x10000
|
|
@@ -136,13 +201,11 @@ def reproduce_one_font(doc, index):
|
|
|
136
201
|
f = doc.xref_get_key(index, "DescendantFonts")
|
|
137
202
|
if m[0] == "xref" and f[0] == "array":
|
|
138
203
|
mi = to_int(m[1])
|
|
139
|
-
fi = to_int(f[1])
|
|
140
|
-
ff = doc.xref_get_key(fi, "FontDescriptor/FontFile2")
|
|
141
204
|
ms = doc.xref_stream(mi)
|
|
142
|
-
fs = doc.xref_stream(to_int(ff[1]))
|
|
143
205
|
cmap = parse_tounicode_cmap(ms)
|
|
144
|
-
|
|
145
|
-
|
|
206
|
+
if not cmap:
|
|
207
|
+
return
|
|
208
|
+
text = make_tounicode(cmap)
|
|
146
209
|
doc.update_stream(mi, bytes(text, "U8"))
|
|
147
210
|
|
|
148
211
|
|
|
@@ -153,7 +216,8 @@ def reproduce_cmap(doc):
|
|
|
153
216
|
try:
|
|
154
217
|
font_list = page.get_fonts()
|
|
155
218
|
for font in font_list:
|
|
156
|
-
|
|
219
|
+
base_font = font[3].split("+", 1)[-1]
|
|
220
|
+
if font[1] == "ttf" and base_font in FONT_NAMES and ".ttf" in font[4]:
|
|
157
221
|
font_set.add(font)
|
|
158
222
|
except Exception as e:
|
|
159
223
|
logger.error(f"Error in getting page fonts: {e}")
|
|
@@ -219,7 +283,7 @@ def _save_pdf_clean_process(
|
|
|
219
283
|
os._exit(1)
|
|
220
284
|
|
|
221
285
|
|
|
222
|
-
class
|
|
286
|
+
class PdfAssembler:
|
|
223
287
|
@staticmethod
|
|
224
288
|
def _parse_xref_ref(value: str) -> int | None:
|
|
225
289
|
match = re.match(r"^\s*(\d+)\s+0\s+R\s*$", value)
|
|
@@ -256,15 +320,6 @@ class PDFCreater:
|
|
|
256
320
|
name: str,
|
|
257
321
|
resource_ref: str,
|
|
258
322
|
) -> None:
|
|
259
|
-
resource_key = f"Resources/{resource_kind}/{name}"
|
|
260
|
-
try:
|
|
261
|
-
pdf.xref_set_key(target_xref, resource_key, resource_ref)
|
|
262
|
-
return
|
|
263
|
-
except Exception as exc:
|
|
264
|
-
if "has indirects" not in str(exc):
|
|
265
|
-
raise
|
|
266
|
-
direct_set_error = exc
|
|
267
|
-
|
|
268
323
|
resources_type, resources_value = pdf.xref_get_key(
|
|
269
324
|
target_xref,
|
|
270
325
|
"Resources",
|
|
@@ -272,18 +327,32 @@ class PDFCreater:
|
|
|
272
327
|
resources_xref = (
|
|
273
328
|
cls._parse_xref_ref(resources_value) if resources_type == "xref" else None
|
|
274
329
|
)
|
|
275
|
-
if resources_xref is None:
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
pdf.xref_set_key(
|
|
330
|
+
if resources_xref is not None:
|
|
331
|
+
kind_type, kind_value = pdf.xref_get_key(resources_xref, resource_kind)
|
|
332
|
+
kind_xref = cls._parse_xref_ref(kind_value) if kind_type == "xref" else None
|
|
333
|
+
if kind_xref is not None:
|
|
334
|
+
pdf.xref_set_key(kind_xref, name, resource_ref)
|
|
335
|
+
return
|
|
336
|
+
pdf.xref_set_key(
|
|
337
|
+
resources_xref,
|
|
338
|
+
f"{resource_kind}/{name}",
|
|
339
|
+
resource_ref,
|
|
340
|
+
)
|
|
282
341
|
return
|
|
283
342
|
|
|
343
|
+
if resources_type == "dict":
|
|
344
|
+
kind_type, kind_value = pdf.xref_get_key(
|
|
345
|
+
target_xref,
|
|
346
|
+
f"Resources/{resource_kind}",
|
|
347
|
+
)
|
|
348
|
+
kind_xref = cls._parse_xref_ref(kind_value) if kind_type == "xref" else None
|
|
349
|
+
if kind_xref is not None:
|
|
350
|
+
pdf.xref_set_key(kind_xref, name, resource_ref)
|
|
351
|
+
return
|
|
352
|
+
|
|
284
353
|
pdf.xref_set_key(
|
|
285
|
-
|
|
286
|
-
f"{resource_kind}/{name}",
|
|
354
|
+
target_xref,
|
|
355
|
+
f"Resources/{resource_kind}/{name}",
|
|
287
356
|
resource_ref,
|
|
288
357
|
)
|
|
289
358
|
|
|
@@ -566,7 +635,7 @@ class PDFCreater:
|
|
|
566
635
|
timeout: int = 120,
|
|
567
636
|
tag: str = "",
|
|
568
637
|
) -> bool:
|
|
569
|
-
"""Save a PDF document
|
|
638
|
+
"""Save a PDF document, isolating clean=True in a subprocess with timeout.
|
|
570
639
|
|
|
571
640
|
Args:
|
|
572
641
|
pdf: The PDF document object
|
|
@@ -580,8 +649,32 @@ class PDFCreater:
|
|
|
580
649
|
timeout: Timeout in seconds (default: 2 minutes)
|
|
581
650
|
|
|
582
651
|
Returns:
|
|
583
|
-
True if saved with clean=True successfully, False if fallback
|
|
652
|
+
True if saved with clean=True successfully, False if fallback or clean=False was used
|
|
584
653
|
"""
|
|
654
|
+
if not clean:
|
|
655
|
+
out_path = Path(output_path)
|
|
656
|
+
tmp_path = out_path.with_name(f".{out_path.name}.tmp.{os.getpid()}")
|
|
657
|
+
try:
|
|
658
|
+
try:
|
|
659
|
+
pdf.save(
|
|
660
|
+
str(tmp_path),
|
|
661
|
+
garbage=garbage,
|
|
662
|
+
deflate=deflate,
|
|
663
|
+
clean=False,
|
|
664
|
+
deflate_fonts=deflate_fonts,
|
|
665
|
+
linear=linear,
|
|
666
|
+
)
|
|
667
|
+
except Exception as e:
|
|
668
|
+
logger.error(f"Error in direct save with clean=False: {e}")
|
|
669
|
+
if tmp_path.exists():
|
|
670
|
+
tmp_path.unlink()
|
|
671
|
+
pdf.save(str(tmp_path))
|
|
672
|
+
tmp_path.replace(out_path)
|
|
673
|
+
finally:
|
|
674
|
+
if tmp_path.exists():
|
|
675
|
+
tmp_path.unlink()
|
|
676
|
+
return False
|
|
677
|
+
|
|
585
678
|
# Create temporary file paths
|
|
586
679
|
temp_input = str(
|
|
587
680
|
translation_config.get_working_file_path(f"temp_save_input_{tag}.pdf")
|
|
@@ -726,7 +726,7 @@ def draw_clustered_lines_to_image(
|
|
|
726
726
|
def main(argv: list[str] | None = None):
|
|
727
727
|
logging.basicConfig(level=logging.INFO, handlers=[RichHandler()])
|
|
728
728
|
parser = argparse.ArgumentParser(
|
|
729
|
-
description="
|
|
729
|
+
description="Debug helper: extract native-parser character boxes and clustered line images."
|
|
730
730
|
)
|
|
731
731
|
parser.add_argument("pdf", nargs="+", help="PDF path(s) to inspect.")
|
|
732
732
|
parser.add_argument("--pages", help="Optional BabelDOC page range, e.g. 1-3.")
|
|
@@ -238,8 +238,8 @@ def is_formulas_font(font_name: str, formular_font_pattern: str | None) -> bool:
|
|
|
238
238
|
r"|.*LatinModernMath-Regular.*"
|
|
239
239
|
r"|.*Latin Modern Math.*"
|
|
240
240
|
r"|.*Luciole.*"
|
|
241
|
-
r"|.*
|
|
242
|
-
r"|.*
|
|
241
|
+
r"|.*NewCMMath.*"
|
|
242
|
+
r"|.*NewComputerModernMath.*"
|
|
243
243
|
r"|.*OldStandard-Math.*"
|
|
244
244
|
r"|.*STIXMath-Regular.*"
|
|
245
245
|
r"|.*STIX Math.*"
|