docvortex 0.2.1__py3-none-any.whl
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.
- docvortex/__init__.py +21 -0
- docvortex/analyzers/__init__.py +3 -0
- docvortex/analyzers/native/__init__.py +37 -0
- docvortex/analyzers/native/_shared/__init__.py +3 -0
- docvortex/analyzers/native/_shared/hyperlink.py +16 -0
- docvortex/analyzers/native/_shared/image.py +8 -0
- docvortex/analyzers/native/_shared/markup/__init__.py +47 -0
- docvortex/analyzers/native/_shared/markup/anchors.py +30 -0
- docvortex/analyzers/native/_shared/markup/formula.py +37 -0
- docvortex/analyzers/native/_shared/markup/projector.py +57 -0
- docvortex/analyzers/native/_shared/markup/styles.py +19 -0
- docvortex/analyzers/native/_shared/mathml.py +17 -0
- docvortex/analyzers/native/_shared/names.py +7 -0
- docvortex/analyzers/native/_shared/xycut.py +414 -0
- docvortex/analyzers/native/contracts.py +44 -0
- docvortex/analyzers/native/csv.py +351 -0
- docvortex/analyzers/native/epub/__init__.py +18 -0
- docvortex/analyzers/native/epub/constants.py +45 -0
- docvortex/analyzers/native/epub/converter.py +80 -0
- docvortex/analyzers/native/epub/errors.py +20 -0
- docvortex/analyzers/native/epub/metadata.py +31 -0
- docvortex/analyzers/native/epub/package.py +649 -0
- docvortex/analyzers/native/epub/xhtml.py +306 -0
- docvortex/analyzers/native/html/__init__.py +6 -0
- docvortex/analyzers/native/html/anchors.py +271 -0
- docvortex/analyzers/native/html/constants.py +25 -0
- docvortex/analyzers/native/html/contracts.py +7 -0
- docvortex/analyzers/native/html/converter.py +117 -0
- docvortex/analyzers/native/html/document.py +389 -0
- docvortex/analyzers/native/html/errors.py +12 -0
- docvortex/analyzers/native/html/resources.py +365 -0
- docvortex/analyzers/native/html/selector.py +421 -0
- docvortex/analyzers/native/models.py +209 -0
- docvortex/analyzers/native/ofd/__init__.py +14 -0
- docvortex/analyzers/native/ofd/constants.py +59 -0
- docvortex/analyzers/native/ofd/converter.py +31 -0
- docvortex/analyzers/native/ofd/errors.py +16 -0
- docvortex/analyzers/native/ofd/geometry.py +215 -0
- docvortex/analyzers/native/ofd/images.py +124 -0
- docvortex/analyzers/native/ofd/metadata.py +53 -0
- docvortex/analyzers/native/ofd/models.py +170 -0
- docvortex/analyzers/native/ofd/package.py +346 -0
- docvortex/analyzers/native/ofd/path.py +201 -0
- docvortex/analyzers/native/ofd/reading_order.py +293 -0
- docvortex/analyzers/native/ofd/resources.py +122 -0
- docvortex/analyzers/native/ofd/scene.py +347 -0
- docvortex/analyzers/native/ofd/table.py +240 -0
- docvortex/analyzers/native/ofd/text.py +521 -0
- docvortex/analyzers/native/office/__init__.py +3 -0
- docvortex/analyzers/native/office/doc/__init__.py +3 -0
- docvortex/analyzers/native/office/doc/bookmarks.py +81 -0
- docvortex/analyzers/native/office/doc/doc_converter.py +573 -0
- docvortex/analyzers/native/office/doc/fib.py +261 -0
- docvortex/analyzers/native/office/doc/fields.py +101 -0
- docvortex/analyzers/native/office/doc/formatting.py +171 -0
- docvortex/analyzers/native/office/doc/images.py +162 -0
- docvortex/analyzers/native/office/doc/lists.py +356 -0
- docvortex/analyzers/native/office/doc/models.py +164 -0
- docvortex/analyzers/native/office/doc/parser.py +851 -0
- docvortex/analyzers/native/office/doc/pieces.py +256 -0
- docvortex/analyzers/native/office/doc/records.py +40 -0
- docvortex/analyzers/native/office/doc/sprm.py +269 -0
- docvortex/analyzers/native/office/doc/styles.py +215 -0
- docvortex/analyzers/native/office/docx/__init__.py +3 -0
- docvortex/analyzers/native/office/docx/context.py +71 -0
- docvortex/analyzers/native/office/docx/docx_converter.py +614 -0
- docvortex/analyzers/native/office/docx/equationxml.py +119 -0
- docvortex/analyzers/native/office/docx/fields.py +816 -0
- docvortex/analyzers/native/office/docx/formatting_types.py +23 -0
- docvortex/analyzers/native/office/docx/main.py +50 -0
- docvortex/analyzers/native/office/docx/numbering.py +491 -0
- docvortex/analyzers/native/office/docx/office_xml.py +57 -0
- docvortex/analyzers/native/office/docx/package_normalizer.py +248 -0
- docvortex/analyzers/native/office/docx/resources.py +526 -0
- docvortex/analyzers/native/office/docx/styles.py +693 -0
- docvortex/analyzers/native/office/docx/tables.py +515 -0
- docvortex/analyzers/native/office/equation/__init__.py +3 -0
- docvortex/analyzers/native/office/equation/image.py +470 -0
- docvortex/analyzers/native/office/equation/latex_dict.py +324 -0
- docvortex/analyzers/native/office/equation/mtef.py +885 -0
- docvortex/analyzers/native/office/equation/mtef_v5.py +941 -0
- docvortex/analyzers/native/office/equation/omml.py +561 -0
- docvortex/analyzers/native/office/equation/ooxml.py +62 -0
- docvortex/analyzers/native/office/errors.py +33 -0
- docvortex/analyzers/native/office/image.py +307 -0
- docvortex/analyzers/native/office/legacy/__init__.py +3 -0
- docvortex/analyzers/native/office/legacy/binary.py +43 -0
- docvortex/analyzers/native/office/legacy/officeart.py +362 -0
- docvortex/analyzers/native/office/legacy/ole.py +110 -0
- docvortex/analyzers/native/office/limits.py +12 -0
- docvortex/analyzers/native/office/odf/__init__.py +3 -0
- docvortex/analyzers/native/office/odf/chart.py +76 -0
- docvortex/analyzers/native/office/odf/constants.py +70 -0
- docvortex/analyzers/native/office/odf/converters.py +403 -0
- docvortex/analyzers/native/office/odf/errors.py +18 -0
- docvortex/analyzers/native/office/odf/metadata.py +91 -0
- docvortex/analyzers/native/office/odf/models.py +176 -0
- docvortex/analyzers/native/office/odf/package.py +270 -0
- docvortex/analyzers/native/office/odf/styles.py +329 -0
- docvortex/analyzers/native/office/odf/table.py +469 -0
- docvortex/analyzers/native/office/odf/text.py +1002 -0
- docvortex/analyzers/native/office/ooxml_chart.py +1016 -0
- docvortex/analyzers/native/office/opc.py +38 -0
- docvortex/analyzers/native/office/ppt/__init__.py +3 -0
- docvortex/analyzers/native/office/ppt/models.py +118 -0
- docvortex/analyzers/native/office/ppt/parser.py +1895 -0
- docvortex/analyzers/native/office/ppt/ppt_converter.py +292 -0
- docvortex/analyzers/native/office/ppt/records.py +131 -0
- docvortex/analyzers/native/office/ppt/style_text.py +247 -0
- docvortex/analyzers/native/office/pptx/__init__.py +3 -0
- docvortex/analyzers/native/office/pptx/context.py +113 -0
- docvortex/analyzers/native/office/pptx/lists.py +558 -0
- docvortex/analyzers/native/office/pptx/main.py +20 -0
- docvortex/analyzers/native/office/pptx/package_normalizer.py +321 -0
- docvortex/analyzers/native/office/pptx/pptx_converter.py +323 -0
- docvortex/analyzers/native/office/pptx/resources.py +329 -0
- docvortex/analyzers/native/office/pptx/shapes.py +393 -0
- docvortex/analyzers/native/office/pptx/text_styles.py +625 -0
- docvortex/analyzers/native/office/pptx/titles.py +178 -0
- docvortex/analyzers/native/office/rich_text.py +420 -0
- docvortex/analyzers/native/office/rtf/__init__.py +3 -0
- docvortex/analyzers/native/office/rtf/converter.py +708 -0
- docvortex/analyzers/native/office/rtf/lexer.py +213 -0
- docvortex/analyzers/native/office/rtf/math.py +339 -0
- docvortex/analyzers/native/office/rtf/models.py +185 -0
- docvortex/analyzers/native/office/rtf/parser.py +1553 -0
- docvortex/analyzers/native/office/spreadsheet/__init__.py +3 -0
- docvortex/analyzers/native/office/spreadsheet/html.py +81 -0
- docvortex/analyzers/native/office/spreadsheet/models.py +79 -0
- docvortex/analyzers/native/office/spreadsheet/projector.py +928 -0
- docvortex/analyzers/native/office/streams.py +18 -0
- docvortex/analyzers/native/office/xls/__init__.py +3 -0
- docvortex/analyzers/native/office/xls/chart.py +132 -0
- docvortex/analyzers/native/office/xls/embedded_chart.py +299 -0
- docvortex/analyzers/native/office/xls/models.py +109 -0
- docvortex/analyzers/native/office/xls/number_format.py +521 -0
- docvortex/analyzers/native/office/xls/parser.py +1145 -0
- docvortex/analyzers/native/office/xls/records.py +201 -0
- docvortex/analyzers/native/office/xls/strings.py +205 -0
- docvortex/analyzers/native/office/xls/xls_converter.py +354 -0
- docvortex/analyzers/native/office/xlsx/__init__.py +3 -0
- docvortex/analyzers/native/office/xlsx/main.py +20 -0
- docvortex/analyzers/native/office/xlsx/ooxml_ole.py +522 -0
- docvortex/analyzers/native/office/xlsx/package_normalizer.py +310 -0
- docvortex/analyzers/native/office/xlsx/xlsx_converter.py +716 -0
- docvortex/analyzers/native/pdf/__init__.py +3 -0
- docvortex/analyzers/native/pdf/auxiliary_text.py +1671 -0
- docvortex/analyzers/native/pdf/char_geometry.py +1662 -0
- docvortex/analyzers/native/pdf/code_blocks.py +535 -0
- docvortex/analyzers/native/pdf/formulas.py +1985 -0
- docvortex/analyzers/native/pdf/geometry.py +281 -0
- docvortex/analyzers/native/pdf/graphics.py +1501 -0
- docvortex/analyzers/native/pdf/index_blocks.py +268 -0
- docvortex/analyzers/native/pdf/inline/__init__.py +3 -0
- docvortex/analyzers/native/pdf/inline/common.py +112 -0
- docvortex/analyzers/native/pdf/inline/detection.py +590 -0
- docvortex/analyzers/native/pdf/inline/matching.py +1185 -0
- docvortex/analyzers/native/pdf/inline/materialize.py +457 -0
- docvortex/analyzers/native/pdf/inline/scripts.py +975 -0
- docvortex/analyzers/native/pdf/inline/types.py +385 -0
- docvortex/analyzers/native/pdf/line_layout.py +1106 -0
- docvortex/analyzers/native/pdf/line_merging.py +1223 -0
- docvortex/analyzers/native/pdf/models.py +246 -0
- docvortex/analyzers/native/pdf/native_text.py +1004 -0
- docvortex/analyzers/native/pdf/pipeline.py +1390 -0
- docvortex/analyzers/native/pdf/script_geometry.py +636 -0
- docvortex/analyzers/native/pdf/shared.py +30 -0
- docvortex/analyzers/native/pdf/spatial_text.py +383 -0
- docvortex/analyzers/native/pdf/table_annotations.py +446 -0
- docvortex/analyzers/native/pdf/table_constants.py +48 -0
- docvortex/analyzers/native/pdf/table_detection.py +227 -0
- docvortex/analyzers/native/pdf/table_filled_grid.py +218 -0
- docvortex/analyzers/native/pdf/table_geometry.py +40 -0
- docvortex/analyzers/native/pdf/table_materialization.py +444 -0
- docvortex/analyzers/native/pdf/table_recovery/__init__.py +15 -0
- docvortex/analyzers/native/pdf/table_recovery/candidate.py +356 -0
- docvortex/analyzers/native/pdf/table_recovery/contracts.py +154 -0
- docvortex/analyzers/native/pdf/table_recovery/engine.py +609 -0
- docvortex/analyzers/native/pdf/table_recovery/geometry.py +164 -0
- docvortex/analyzers/native/pdf/table_recovery/sparse_common.py +85 -0
- docvortex/analyzers/native/pdf/table_recovery/sparse_hybrid.py +804 -0
- docvortex/analyzers/native/pdf/table_recovery/sparse_multiline.py +1122 -0
- docvortex/analyzers/native/pdf/table_recovery/text.py +414 -0
- docvortex/analyzers/native/pdf/table_recovery/text_grid.py +618 -0
- docvortex/analyzers/native/pdf/table_recovery/vector.py +1931 -0
- docvortex/analyzers/native/pdf/table_rows.py +34 -0
- docvortex/analyzers/native/pdf/table_rules.py +1129 -0
- docvortex/analyzers/native/pdf/table_text_styles.py +283 -0
- docvortex/analyzers/native/pdf/tables.py +147 -0
- docvortex/analyzers/native/pdf/text_assembly/__init__.py +3 -0
- docvortex/analyzers/native/pdf/text_assembly/annotations.py +581 -0
- docvortex/analyzers/native/pdf/text_assembly/assembly.py +292 -0
- docvortex/analyzers/native/pdf/text_assembly/common.py +477 -0
- docvortex/analyzers/native/pdf/text_assembly/footnotes.py +394 -0
- docvortex/analyzers/native/pdf/text_assembly/merging.py +1274 -0
- docvortex/analyzers/native/pdf/text_assembly/rows.py +692 -0
- docvortex/analyzers/native/pdf/text_blocks.py +82 -0
- docvortex/analyzers/native/pdf/text_styles.py +55 -0
- docvortex/analyzers/native/pdf/title_analysis/__init__.py +3 -0
- docvortex/analyzers/native/pdf/title_analysis/body_profile.py +215 -0
- docvortex/analyzers/native/pdf/title_analysis/common.py +117 -0
- docvortex/analyzers/native/pdf/title_analysis/document_profile.py +164 -0
- docvortex/analyzers/native/pdf/title_analysis/lane_titles.py +758 -0
- docvortex/analyzers/native/pdf/title_analysis/page_titles.py +1024 -0
- docvortex/analyzers/native/pdf/title_analysis/prototype.py +194 -0
- docvortex/analyzers/native/pdf/title_analysis/structural.py +1081 -0
- docvortex/analyzers/native/pdf/titles.py +75 -0
- docvortex/analyzers/native/pdf/typography.py +19 -0
- docvortex/analyzers/native/pdf/visual_annotations.py +1262 -0
- docvortex/api.py +180 -0
- docvortex/assets/__init__.py +5 -0
- docvortex/assets/store.py +51 -0
- docvortex/cli.py +54 -0
- docvortex/codecs/__init__.py +3 -0
- docvortex/codecs/html/__init__.py +22 -0
- docvortex/codecs/html/contracts.py +236 -0
- docvortex/codecs/html/materializer.py +331 -0
- docvortex/codecs/html/parser.py +763 -0
- docvortex/codecs/html/resources.py +34 -0
- docvortex/codecs/json.py +17 -0
- docvortex/content/__init__.py +5 -0
- docvortex/content/inline.py +248 -0
- docvortex/content/markup/__init__.py +44 -0
- docvortex/content/markup/anchors.py +188 -0
- docvortex/content/markup/formula.py +280 -0
- docvortex/content/markup/projector.py +1237 -0
- docvortex/content/markup/styles.py +327 -0
- docvortex/content/mathml.py +167 -0
- docvortex/content/normalization.py +188 -0
- docvortex/content/spans.py +183 -0
- docvortex/content/table/__init__.py +18 -0
- docvortex/content/table/blocks.py +152 -0
- docvortex/content/table/content.py +425 -0
- docvortex/content/table/document.py +104 -0
- docvortex/content/table/html.py +399 -0
- docvortex/content/table/models.py +76 -0
- docvortex/content/table/rules.py +42 -0
- docvortex/content/table/structure.py +221 -0
- docvortex/content/tree.py +5 -0
- docvortex/document/__init__.py +3 -0
- docvortex/document/contracts.py +22 -0
- docvortex/document/detection.py +389 -0
- docvortex/document/filetypes.py +175 -0
- docvortex/document/page_range.py +167 -0
- docvortex/document/pdf/__init__.py +19 -0
- docvortex/document/pdf/classify.py +1138 -0
- docvortex/document/pdf/constants.py +132 -0
- docvortex/document/pdf/diagnostics.py +350 -0
- docvortex/document/pdf/document.py +582 -0
- docvortex/document/pdf/font_runtime.py +335 -0
- docvortex/document/pdf/geometry.py +31 -0
- docvortex/document/pdf/images.py +654 -0
- docvortex/document/pdf/native_annotations.py +367 -0
- docvortex/document/pdf/native_contracts.py +169 -0
- docvortex/document/pdf/native_coordinates.py +216 -0
- docvortex/document/pdf/native_lifecycle.py +16 -0
- docvortex/document/pdf/native_objects.py +902 -0
- docvortex/document/pdf/native_text_geometry.py +315 -0
- docvortex/document/pdf/pdfium.py +325 -0
- docvortex/document/pdf/raster.py +46 -0
- docvortex/document/pdf/text/__init__.py +62 -0
- docvortex/document/pdf/text/contracts.py +211 -0
- docvortex/document/pdf/text/extract.py +165 -0
- docvortex/document/pdf/text/geometry.py +16 -0
- docvortex/document/pdf/text/groups.py +162 -0
- docvortex/document/pdf/visual_geometry.py +201 -0
- docvortex/document/pdf/visuals.py +343 -0
- docvortex/document/source.py +92 -0
- docvortex/errors.py +21 -0
- docvortex/export/__init__.py +3 -0
- docvortex/export/bundle.py +98 -0
- docvortex/export/files.py +66 -0
- docvortex/export/middle.py +208 -0
- docvortex/foundation/__init__.py +3 -0
- docvortex/foundation/geometry.py +125 -0
- docvortex/foundation/hyperlink.py +65 -0
- docvortex/foundation/image.py +48 -0
- docvortex/foundation/image_encoding.py +30 -0
- docvortex/foundation/image_payload.py +280 -0
- docvortex/foundation/language.py +92 -0
- docvortex/foundation/platform.py +38 -0
- docvortex/foundation/text.py +153 -0
- docvortex/foundation/type_identity.py +20 -0
- docvortex/foundation/xml_names.py +20 -0
- docvortex/options.py +30 -0
- docvortex/postprocess/__init__.py +3 -0
- docvortex/postprocess/content.py +53 -0
- docvortex/postprocess/document.py +19 -0
- docvortex/postprocess/lists.py +236 -0
- docvortex/postprocess/page_blocks.py +214 -0
- docvortex/postprocess/pages.py +95 -0
- docvortex/postprocess/paragraphs.py +580 -0
- docvortex/postprocess/visual.py +715 -0
- docvortex/render/__init__.py +48 -0
- docvortex/render/_internal/__init__.py +3 -0
- docvortex/render/_internal/common/__init__.py +3 -0
- docvortex/render/_internal/common/context.py +43 -0
- docvortex/render/_internal/common/html_table.py +178 -0
- docvortex/render/_internal/common/index.py +33 -0
- docvortex/render/_internal/common/list_items.py +158 -0
- docvortex/render/_internal/common/planner.py +140 -0
- docvortex/render/_internal/docx/__init__.py +3 -0
- docvortex/render/_internal/docx/assets.py +202 -0
- docvortex/render/_internal/docx/inline.py +434 -0
- docvortex/render/_internal/docx/math.py +220 -0
- docvortex/render/_internal/docx/renderer.py +905 -0
- docvortex/render/_internal/docx/styles.py +195 -0
- docvortex/render/_internal/docx/table.py +442 -0
- docvortex/render/_internal/epub/__init__.py +5 -0
- docvortex/render/_internal/epub/assets.py +173 -0
- docvortex/render/_internal/epub/package.py +249 -0
- docvortex/render/_internal/epub/renderer.py +1156 -0
- docvortex/render/_internal/html/__init__.py +3 -0
- docvortex/render/_internal/html/inline.py +346 -0
- docvortex/render/_internal/html/renderer.py +1041 -0
- docvortex/render/_internal/html/sanitizer.py +478 -0
- docvortex/render/_internal/html/table.py +121 -0
- docvortex/render/_internal/latex/__init__.py +1 -0
- docvortex/render/_internal/latex/assets.py +85 -0
- docvortex/render/_internal/latex/inline.py +145 -0
- docvortex/render/_internal/latex/renderer.py +506 -0
- docvortex/render/_internal/latex/table.py +347 -0
- docvortex/render/_internal/markdown/__init__.py +3 -0
- docvortex/render/_internal/markdown/assets.py +78 -0
- docvortex/render/_internal/markdown/blocks.py +635 -0
- docvortex/render/_internal/markdown/escaping.py +51 -0
- docvortex/render/_internal/markdown/inline.py +260 -0
- docvortex/render/_internal/markdown/renderer.py +93 -0
- docvortex/render/_internal/markdown/table.py +281 -0
- docvortex/render/_internal/pdf/__init__.py +3 -0
- docvortex/render/_internal/pdf/assets.py +197 -0
- docvortex/render/_internal/pdf/formula.py +417 -0
- docvortex/render/_internal/pdf/inline.py +343 -0
- docvortex/render/_internal/pdf/renderer.py +734 -0
- docvortex/render/_internal/pdf/styles.py +206 -0
- docvortex/render/_internal/pdf/table.py +272 -0
- docvortex/render/_internal/structured_content/__init__.py +3 -0
- docvortex/render/_internal/structured_content/renderer.py +193 -0
- docvortex/render/api.py +199 -0
- docvortex/render/contracts.py +205 -0
- docvortex/render/docx.py +38 -0
- docvortex/render/epub.py +35 -0
- docvortex/render/fragments.py +70 -0
- docvortex/render/html.py +29 -0
- docvortex/render/latex.py +24 -0
- docvortex/render/markdown.py +50 -0
- docvortex/render/pdf.py +25 -0
- docvortex/render/structured_content.py +23 -0
- docvortex/resources/epub/docvortex.css +91 -0
- docvortex/resources/fasttext-langdetect/lid.176.ftz +0 -0
- docvortex/resources/fonts/DroidSansFallbackFull.ttf +0 -0
- docvortex/resources/fonts/NOTICE +190 -0
- docvortex/resources/fonts/manifest.json +9 -0
- docvortex/resources/html/docvortex.css +601 -0
- docvortex/resources/html/docvortex.min.css +1 -0
- docvortex/result.py +91 -0
- docvortex/schema.py +1141 -0
- docvortex/version.py +3 -0
- docvortex-0.2.1.dist-info/METADATA +193 -0
- docvortex-0.2.1.dist-info/RECORD +364 -0
- docvortex-0.2.1.dist-info/WHEEL +5 -0
- docvortex-0.2.1.dist-info/entry_points.txt +2 -0
- docvortex-0.2.1.dist-info/licenses/LICENSE.md +21 -0
- docvortex-0.2.1.dist-info/top_level.txt +1 -0
docvortex/__init__.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""快速多格式文档解析与转换引擎。"""
|
|
2
|
+
|
|
3
|
+
from .version import __version__
|
|
4
|
+
from .api import analyze, parse, convert
|
|
5
|
+
from .api import postprocess as postprocess_document, render as render_artifact
|
|
6
|
+
from .export.bundle import load_bundle
|
|
7
|
+
from .result import AnalysisResult, DocumentResult, RenderArtifact, ExportResult
|
|
8
|
+
|
|
9
|
+
__all__ = [
|
|
10
|
+
"__version__",
|
|
11
|
+
"analyze",
|
|
12
|
+
"postprocess_document",
|
|
13
|
+
"parse",
|
|
14
|
+
"render_artifact",
|
|
15
|
+
"convert",
|
|
16
|
+
"load_bundle",
|
|
17
|
+
"AnalysisResult",
|
|
18
|
+
"DocumentResult",
|
|
19
|
+
"RenderArtifact",
|
|
20
|
+
"ExportResult",
|
|
21
|
+
]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""Flash PDF、EPUB、HTML、OFD、CSV 与 Office 模型公开入口。"""
|
|
2
|
+
|
|
3
|
+
from .models import (
|
|
4
|
+
CsvModel,
|
|
5
|
+
DocModel,
|
|
6
|
+
DocxModel,
|
|
7
|
+
EpubModel,
|
|
8
|
+
HtmlModel,
|
|
9
|
+
OfdModel,
|
|
10
|
+
OdpModel,
|
|
11
|
+
OdsModel,
|
|
12
|
+
OdtModel,
|
|
13
|
+
PdfModel,
|
|
14
|
+
PptModel,
|
|
15
|
+
PptxModel,
|
|
16
|
+
RtfModel,
|
|
17
|
+
XlsModel,
|
|
18
|
+
XlsxModel,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"PdfModel",
|
|
23
|
+
"CsvModel",
|
|
24
|
+
"EpubModel",
|
|
25
|
+
"HtmlModel",
|
|
26
|
+
"OfdModel",
|
|
27
|
+
"RtfModel",
|
|
28
|
+
"DocModel",
|
|
29
|
+
"DocxModel",
|
|
30
|
+
"PptModel",
|
|
31
|
+
"PptxModel",
|
|
32
|
+
"XlsModel",
|
|
33
|
+
"XlsxModel",
|
|
34
|
+
"OdtModel",
|
|
35
|
+
"OdsModel",
|
|
36
|
+
"OdpModel",
|
|
37
|
+
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""兼容导出位于 utils 层的共享超链接安全策略。"""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from ....foundation.hyperlink import (
|
|
6
|
+
DEFAULT_EXTERNAL_HYPERLINK_SCHEMES,
|
|
7
|
+
OFFICE_EXTERNAL_HYPERLINK_SCHEMES,
|
|
8
|
+
sanitize_hyperlink_target,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"DEFAULT_EXTERNAL_HYPERLINK_SCHEMES",
|
|
14
|
+
"OFFICE_EXTERNAL_HYPERLINK_SCHEMES",
|
|
15
|
+
"sanitize_hyperlink_target",
|
|
16
|
+
]
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""保留原有导入入口;共享实现由下层模块唯一维护。"""
|
|
2
|
+
|
|
3
|
+
from docvortex.content.markup import (
|
|
4
|
+
AnchorTextNormalization as AnchorTextNormalization,
|
|
5
|
+
AnchorVisibilityScope as AnchorVisibilityScope,
|
|
6
|
+
ElementStyle as ElementStyle,
|
|
7
|
+
FormulaDisplay as FormulaDisplay,
|
|
8
|
+
FormulaExtraction as FormulaExtraction,
|
|
9
|
+
FormulaSourceKind as FormulaSourceKind,
|
|
10
|
+
MarkupAnchorDocument as MarkupAnchorDocument,
|
|
11
|
+
MarkupAnchorPolicy as MarkupAnchorPolicy,
|
|
12
|
+
MarkupAnchorRegistry as MarkupAnchorRegistry,
|
|
13
|
+
MarkupContext as MarkupContext,
|
|
14
|
+
MarkupProjector as MarkupProjector,
|
|
15
|
+
MarkupStylesheet as MarkupStylesheet,
|
|
16
|
+
ResolvedMarkupImage as ResolvedMarkupImage,
|
|
17
|
+
TextStyle as TextStyle,
|
|
18
|
+
TextStyleDelta as TextStyleDelta,
|
|
19
|
+
canonical_anchor as canonical_anchor,
|
|
20
|
+
element_id as element_id,
|
|
21
|
+
extract_formula as extract_formula,
|
|
22
|
+
strip_formula_delimiters as strip_formula_delimiters,
|
|
23
|
+
visible_element_text as visible_element_text,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
__all__ = [
|
|
27
|
+
"AnchorTextNormalization",
|
|
28
|
+
"AnchorVisibilityScope",
|
|
29
|
+
"ElementStyle",
|
|
30
|
+
"FormulaDisplay",
|
|
31
|
+
"FormulaExtraction",
|
|
32
|
+
"FormulaSourceKind",
|
|
33
|
+
"MarkupAnchorDocument",
|
|
34
|
+
"MarkupAnchorPolicy",
|
|
35
|
+
"MarkupAnchorRegistry",
|
|
36
|
+
"MarkupContext",
|
|
37
|
+
"MarkupProjector",
|
|
38
|
+
"MarkupStylesheet",
|
|
39
|
+
"ResolvedMarkupImage",
|
|
40
|
+
"TextStyle",
|
|
41
|
+
"TextStyleDelta",
|
|
42
|
+
"canonical_anchor",
|
|
43
|
+
"element_id",
|
|
44
|
+
"extract_formula",
|
|
45
|
+
"strip_formula_delimiters",
|
|
46
|
+
"visible_element_text",
|
|
47
|
+
]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""保留原有导入入口;共享实现由下层模块唯一维护。"""
|
|
2
|
+
|
|
3
|
+
from docvortex.content.markup.anchors import (
|
|
4
|
+
AnchorTextNormalization as AnchorTextNormalization,
|
|
5
|
+
AnchorVisibilityScope as AnchorVisibilityScope,
|
|
6
|
+
MarkupAnchorDocument as MarkupAnchorDocument,
|
|
7
|
+
MarkupAnchorPolicy as MarkupAnchorPolicy,
|
|
8
|
+
MarkupAnchorRegistry as MarkupAnchorRegistry,
|
|
9
|
+
MarkupStylesheet as MarkupStylesheet,
|
|
10
|
+
TextStyle as TextStyle,
|
|
11
|
+
_HEADING_TAGS as _HEADING_TAGS,
|
|
12
|
+
_XHTML_WHITESPACE_RE as _XHTML_WHITESPACE_RE,
|
|
13
|
+
_XML_ID as _XML_ID,
|
|
14
|
+
canonical_anchor as canonical_anchor,
|
|
15
|
+
element_id as element_id,
|
|
16
|
+
local_name as local_name,
|
|
17
|
+
visible_element_text as visible_element_text,
|
|
18
|
+
visible_raw_text_with_style as visible_raw_text_with_style,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"AnchorTextNormalization",
|
|
23
|
+
"AnchorVisibilityScope",
|
|
24
|
+
"MarkupAnchorDocument",
|
|
25
|
+
"MarkupAnchorPolicy",
|
|
26
|
+
"MarkupAnchorRegistry",
|
|
27
|
+
"canonical_anchor",
|
|
28
|
+
"element_id",
|
|
29
|
+
"visible_element_text",
|
|
30
|
+
]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""保留原有导入入口;共享实现由下层模块唯一维护。"""
|
|
2
|
+
|
|
3
|
+
from docvortex.content.markup.formula import (
|
|
4
|
+
FormulaDisplay as FormulaDisplay,
|
|
5
|
+
FormulaExtraction as FormulaExtraction,
|
|
6
|
+
FormulaSourceKind as FormulaSourceKind,
|
|
7
|
+
_DISPLAY_FORMULA_TOKENS as _DISPLAY_FORMULA_TOKENS,
|
|
8
|
+
_MATH_SCRIPT_TYPE_RE as _MATH_SCRIPT_TYPE_RE,
|
|
9
|
+
_PRESENTATION_ARITIES as _PRESENTATION_ARITIES,
|
|
10
|
+
_PRESENTATION_MATHML_TAGS as _PRESENTATION_MATHML_TAGS,
|
|
11
|
+
_TEX_ANNOTATION_ENCODINGS as _TEX_ANNOTATION_ENCODINGS,
|
|
12
|
+
_class_tokens as _class_tokens,
|
|
13
|
+
_data_formula as _data_formula,
|
|
14
|
+
_formula_display as _formula_display,
|
|
15
|
+
_is_supported_presentation_mathml as _is_supported_presentation_mathml,
|
|
16
|
+
_mathml_alttext as _mathml_alttext,
|
|
17
|
+
_normalized_attribute as _normalized_attribute,
|
|
18
|
+
_presentation_mathml as _presentation_mathml,
|
|
19
|
+
_script_display as _script_display,
|
|
20
|
+
_subtree_attribute as _subtree_attribute,
|
|
21
|
+
_tex_annotation as _tex_annotation,
|
|
22
|
+
_tex_script as _tex_script,
|
|
23
|
+
extract_formula as extract_formula,
|
|
24
|
+
is_tex_script as is_tex_script,
|
|
25
|
+
local_name as local_name,
|
|
26
|
+
mathml_to_latex as mathml_to_latex,
|
|
27
|
+
strip_formula_delimiters as strip_formula_delimiters,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
__all__ = [
|
|
31
|
+
"FormulaDisplay",
|
|
32
|
+
"FormulaExtraction",
|
|
33
|
+
"FormulaSourceKind",
|
|
34
|
+
"extract_formula",
|
|
35
|
+
"is_tex_script",
|
|
36
|
+
"strip_formula_delimiters",
|
|
37
|
+
]
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"""保留原有导入入口;共享实现由下层模块唯一维护。"""
|
|
2
|
+
|
|
3
|
+
from docvortex.content.markup.projector import (
|
|
4
|
+
BLOCK_TAGS as BLOCK_TAGS,
|
|
5
|
+
BlockType as BlockType,
|
|
6
|
+
FormulaExtraction as FormulaExtraction,
|
|
7
|
+
MarkupContext as MarkupContext,
|
|
8
|
+
MarkupProjector as MarkupProjector,
|
|
9
|
+
MarkupStylesheet as MarkupStylesheet,
|
|
10
|
+
RAW_ALGORITHM as RAW_ALGORITHM,
|
|
11
|
+
ResolvedMarkupImage as ResolvedMarkupImage,
|
|
12
|
+
SKIPPED_TAGS as SKIPPED_TAGS,
|
|
13
|
+
TextStyle as TextStyle,
|
|
14
|
+
VISUAL_TYPE_MAPPING as VISUAL_TYPE_MAPPING,
|
|
15
|
+
_CAPTION_TOKENS as _CAPTION_TOKENS,
|
|
16
|
+
_FOOTNOTE_TOKENS as _FOOTNOTE_TOKENS,
|
|
17
|
+
_InlineProjectionSegment as _InlineProjectionSegment,
|
|
18
|
+
_InlineSpanDict as _InlineSpanDict,
|
|
19
|
+
_LIST_PAGE_BLOCK_TAGS as _LIST_PAGE_BLOCK_TAGS,
|
|
20
|
+
_MAX_TABLE_SPAN as _MAX_TABLE_SPAN,
|
|
21
|
+
_VISUAL_ELEMENT_TAGS as _VISUAL_ELEMENT_TAGS,
|
|
22
|
+
_WHITESPACE_RE as _WHITESPACE_RE,
|
|
23
|
+
_XLINK_HREF as _XLINK_HREF,
|
|
24
|
+
_append_inline_segment as _append_inline_segment,
|
|
25
|
+
_append_list_block_content as _append_list_block_content,
|
|
26
|
+
_raw_visual_type as _raw_visual_type,
|
|
27
|
+
_semantic_tokens as _semantic_tokens,
|
|
28
|
+
append_code_span as append_code_span,
|
|
29
|
+
append_equation_span as append_equation_span,
|
|
30
|
+
append_hyperlink_span as append_hyperlink_span,
|
|
31
|
+
append_text_span as append_text_span,
|
|
32
|
+
bounded_table_span as bounded_table_span,
|
|
33
|
+
clean_text_node as clean_text_node,
|
|
34
|
+
entity_text as entity_text,
|
|
35
|
+
extend_inline_spans as extend_inline_spans,
|
|
36
|
+
extract_formula as extract_formula,
|
|
37
|
+
inline_span_plain_text as inline_span_plain_text,
|
|
38
|
+
local_name as local_name,
|
|
39
|
+
strip_span_dicts as strip_span_dicts,
|
|
40
|
+
text_spans as text_spans,
|
|
41
|
+
visible_raw_text_with_style as visible_raw_text_with_style,
|
|
42
|
+
visible_text as visible_text,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
__all__ = [
|
|
46
|
+
"BLOCK_TAGS",
|
|
47
|
+
"MarkupContext",
|
|
48
|
+
"MarkupProjector",
|
|
49
|
+
"ResolvedMarkupImage",
|
|
50
|
+
"SKIPPED_TAGS",
|
|
51
|
+
"bounded_table_span",
|
|
52
|
+
"clean_text_node",
|
|
53
|
+
"entity_text",
|
|
54
|
+
"local_name",
|
|
55
|
+
"visible_raw_text_with_style",
|
|
56
|
+
"visible_text",
|
|
57
|
+
]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""保留原有导入入口;共享实现由下层模块唯一维护。"""
|
|
2
|
+
|
|
3
|
+
from docvortex.content.markup.styles import (
|
|
4
|
+
ElementStyle as ElementStyle,
|
|
5
|
+
MarkupStylesheet as MarkupStylesheet,
|
|
6
|
+
TextStyle as TextStyle,
|
|
7
|
+
TextStyleDelta as TextStyleDelta,
|
|
8
|
+
_CSS_COMMENT_RE as _CSS_COMMENT_RE,
|
|
9
|
+
_CSS_IMPORTANT_RE as _CSS_IMPORTANT_RE,
|
|
10
|
+
_ParsedDeclarations as _ParsedDeclarations,
|
|
11
|
+
_SelectorCascade as _SelectorCascade,
|
|
12
|
+
_TEXT_STYLE_FIELDS as _TEXT_STYLE_FIELDS,
|
|
13
|
+
_VISIBILITY_FIELDS as _VISIBILITY_FIELDS,
|
|
14
|
+
_numeric_font_weight as _numeric_font_weight,
|
|
15
|
+
_parse_declarations as _parse_declarations,
|
|
16
|
+
local_name as local_name,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
__all__ = ["ElementStyle", "MarkupStylesheet", "TextStyle", "TextStyleDelta"]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""保留原有导入入口;共享实现由下层模块唯一维护。"""
|
|
2
|
+
|
|
3
|
+
from docvortex.content.mathml import (
|
|
4
|
+
_GREEK_MAP as _GREEK_MAP,
|
|
5
|
+
_LATEX_ESCAPE_RE as _LATEX_ESCAPE_RE,
|
|
6
|
+
_LATEX_MATH_TOKEN_ESCAPES as _LATEX_MATH_TOKEN_ESCAPES,
|
|
7
|
+
_OPERATOR_MAP as _OPERATOR_MAP,
|
|
8
|
+
_children as _children,
|
|
9
|
+
_convert as _convert,
|
|
10
|
+
_escape_math_token as _escape_math_token,
|
|
11
|
+
_escape_text as _escape_text,
|
|
12
|
+
_join_children as _join_children,
|
|
13
|
+
local_name as local_name,
|
|
14
|
+
mathml_to_latex as mathml_to_latex,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
__all__ = ["mathml_to_latex"]
|