python-docx-oss 0.3.3__tar.gz → 0.4.0__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.
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/HISTORY.md +10 -0
- {python_docx_oss-0.3.3/src/python_docx_oss.egg-info → python_docx_oss-0.4.0}/PKG-INFO +43 -4
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/README.md +42 -3
- python_docx_oss-0.4.0/docs/api/inspection.rst +11 -0
- python_docx_oss-0.4.0/docs/api/transforms.rst +9 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/index.rst +4 -0
- python_docx_oss-0.4.0/docs/user/inspection.rst +151 -0
- python_docx_oss-0.4.0/docs/user/transformations.rst +149 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/_scratch/test_out.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/__init__.py +4 -2
- python_docx_oss-0.4.0/src/docx/inspection/__init__.py +24 -0
- python_docx_oss-0.4.0/src/docx/inspection/features.py +157 -0
- python_docx_oss-0.4.0/src/docx/inspection/fingerprint.py +150 -0
- python_docx_oss-0.4.0/src/docx/inspection/reader.py +245 -0
- python_docx_oss-0.4.0/src/docx/inspection/result.py +59 -0
- python_docx_oss-0.4.0/src/docx/inspection/source.py +40 -0
- python_docx_oss-0.4.0/src/docx/transforms/__init__.py +19 -0
- python_docx_oss-0.4.0/src/docx/transforms/hyperlinks.py +401 -0
- python_docx_oss-0.4.0/src/docx/transforms/normalize.py +93 -0
- python_docx_oss-0.4.0/src/docx/transforms/package.py +102 -0
- python_docx_oss-0.4.0/src/docx/transforms/repair.py +46 -0
- python_docx_oss-0.4.0/src/docx/transforms/result.py +48 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0/src/python_docx_oss.egg-info}/PKG-INFO +43 -4
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/python_docx_oss.egg-info/SOURCES.txt +24 -0
- python_docx_oss-0.4.0/tests/inspection/helpers.py +49 -0
- python_docx_oss-0.4.0/tests/inspection/test_fingerprint.py +190 -0
- python_docx_oss-0.4.0/tests/inspection/test_inspect.py +380 -0
- python_docx_oss-0.4.0/tests/transforms/__init__.py +0 -0
- python_docx_oss-0.4.0/tests/transforms/helpers.py +84 -0
- python_docx_oss-0.4.0/tests/transforms/test_normalize.py +475 -0
- python_docx_oss-0.4.0/tests/transforms/test_repair.py +160 -0
- python_docx_oss-0.4.0/tests/unitutil/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/LICENSE +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/MANIFEST.in +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/Makefile +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/_static/.gitignore +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/_static/img/comment-parts.png +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/_static/img/example-docx-01.png +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/_static/img/hdrftr-01.png +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/_static/img/hdrftr-02.png +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/_static/img/oss.png +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/_templates/layout.html +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/_templates/sidebarlinks.html +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/_themes/armstrong/LICENSE +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/_themes/armstrong/layout.html +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/_themes/armstrong/rtd-themes.conf +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/_themes/armstrong/static/rtd.css_t +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/_themes/armstrong/theme.conf +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/_themes/armstrong/theme.conf.orig +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/comments.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/dml.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/document.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/enum/MsoColorType.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/enum/MsoThemeColorIndex.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/enum/WdAlignParagraph.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/enum/WdBuiltinStyle.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/enum/WdCellVerticalAlignment.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/enum/WdColorIndex.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/enum/WdLineSpacing.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/enum/WdOrientation.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/enum/WdRowAlignment.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/enum/WdRowHeightRule.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/enum/WdSectionStart.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/enum/WdStyleType.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/enum/WdTabAlignment.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/enum/WdTabLeader.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/enum/WdTableDirection.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/enum/WdUnderline.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/enum/index.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/sanitize.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/section.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/settings.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/shape.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/shared.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/style.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/table.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/api/text.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/conf.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/comments.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/coreprops.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/header.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/numbering.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/sections.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/settings.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/shapes/index.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/shapes/picture.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/shapes/shapes-inline-size.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/shapes/shapes-inline.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/styles/character-style.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/styles/index.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/styles/latent-styles.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/styles/paragraph-style.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/styles/style.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/styles/styles.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/table/cell-merge.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/table/index.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/table/table-cell.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/table/table-props.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/table/table-row.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/text/breaks.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/text/font-color.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/text/font-highlight-color.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/text/font.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/text/hyperlink.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/text/index.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/text/paragraph-format.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/text/run-content.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/text/tab-stops.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/features/text/underline.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/index.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/schema/ct_body.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/schema/ct_document.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/analysis/schema/ct_p.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/dev/upstream-maintenance.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/requirements.txt +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/user/api-concepts.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/user/comments.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/user/compatibility.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/user/custom-properties.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/user/custom-xml.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/user/documents.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/user/hdrftr.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/user/install.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/user/quickstart.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/user/sanitization.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/user/sections.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/user/shapes.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/user/styles-understanding.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/user/styles-using.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/user/tables.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/docs/user/text.rst +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/api-open-document.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/blk-add-paragraph.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/blk-add-table.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/blk-iter-inner-content.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/cmt-mutations.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/cmt-props.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/doc-access-collections.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/doc-access-sections.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/doc-add-comment.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/doc-add-heading.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/doc-add-page-break.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/doc-add-paragraph.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/doc-add-picture.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/doc-add-section.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/doc-add-table.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/doc-comments.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/doc-coreprops.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/doc-customprops.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/doc-settings.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/doc-styles.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/environment.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/hdr-header-footer.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/hlk-props.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/img-characterize-image.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/num-access-numbering-part.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/par-access-inner-content.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/par-access-parfmt.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/par-add-run.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/par-alignment-prop.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/par-clear-paragraph.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/par-insert-paragraph.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/par-set-text.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/par-style-prop.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/pbk-split-para.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/run-access-font.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/run-access-inner-content.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/run-add-content.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/run-add-picture.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/run-char-style.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/run-clear-run.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/run-enum-props.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/sct-section.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/shp-inline-shape-access.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/shp-inline-shape-size.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/api.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/block.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/comments.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/coreprops.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/customprops.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/document.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/font.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/hdrftr.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/helpers.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/hyperlink.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/image.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/numbering.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/pagebreak.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/paragraph.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/parfmt.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/section.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/settings.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/shape.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/shared.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/styles.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/table.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/tabstops.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/blk-containing-table.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/blk-paras-and-tables.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/comments-rich-para.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/court-exif.jpg +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/doc-access-sections.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/doc-add-section.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/doc-coreprops.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/doc-customprops-legacy.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/doc-customprops.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/doc-default.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/doc-no-coreprops.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/doc-no-customprops.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/doc-odd-even-hdrs.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/doc-word-default-blank.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/fnt-color.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/hdr-header-footer.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/jfif-300-dpi.jpg +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/jpeg420exif.jpg +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/lena.bmp +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/lena.gif +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/lena.tif +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/lena_std.jpg +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/monty-truth.png +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/mountain.bmp +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/num-having-numbering-part.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/par-alignment.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/par-hlink-frags.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/par-hyperlinks.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/par-known-paragraphs.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/par-known-styles.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/par-rendered-page-breaks.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/python-icon.jpeg +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/run-char-style.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/run-enumerated-props.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/sample.tif +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/sct-first-page-hdrftr.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/sct-inner-content.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/sct-section-props.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/set-no-settings-part.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/shp-inline-shape-access.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/sty-behav-props.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/sty-having-no-styles-part.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/sty-having-styles-part.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/sty-known-styles.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/tab-stops.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/tbl-2x2-table.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/tbl-cell-access.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/tbl-cell-props.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/tbl-col-props.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/tbl-having-applied-style.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/tbl-having-tables.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/tbl-on-off-props.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/tbl-props.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/test.png +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/txt-font-highlight-color.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/test_files/txt-font-props.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/steps/text.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/sty-access-font.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/sty-access-latent-styles.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/sty-access-parfmt.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/sty-add-style.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/sty-delete-style.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/sty-latent-add-del.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/sty-latent-props.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/sty-style-props.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/tab-access-tabs.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/tab-tabstop-props.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/tbl-add-row-or-col.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/tbl-cell-access.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/tbl-cell-add-table.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/tbl-cell-props.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/tbl-cell-text.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/tbl-col-props.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/tbl-item-access.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/tbl-merge-cells.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/tbl-props.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/tbl-row-props.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/tbl-style.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/txt-add-break.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/txt-font-color.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/txt-font-props.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/features/txt-parfmt-props.feature +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/pyproject.toml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/requirements-dev.txt +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/requirements-docs.txt +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/requirements-test.txt +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/requirements.txt +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/setup.cfg +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/api.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/blkcntnr.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/comments.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/dml/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/dml/color.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/document.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/drawing/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/enum/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/enum/base.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/enum/dml.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/enum/section.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/enum/shape.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/enum/style.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/enum/table.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/enum/text.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/exceptions.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/image/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/image/bmp.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/image/constants.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/image/emf.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/image/exceptions.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/image/gif.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/image/helpers.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/image/image.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/image/jpeg.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/image/png.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/image/svg.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/image/tiff.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/constants.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/coreprops.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/customprops.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/exceptions.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/oxml.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/package.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/packuri.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/part.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/parts/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/parts/coreprops.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/parts/customprops.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/phys_pkg.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/pkgreader.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/pkgwriter.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/rel.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/shared.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/opc/spec.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/comments.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/coreprops.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/customprops.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/dml/CT_ExtensionList.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/document.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/drawing.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/exceptions.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/ns.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/numbering.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/parser.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/section.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/settings.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/shape.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/shared.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/simpletypes.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/styles.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/table.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/text/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/text/font.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/text/hyperlink.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/text/pagebreak.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/text/paragraph.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/text/parfmt.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/text/run.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/oxml/xmlchemy.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/package.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/parts/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/parts/comments.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/parts/customxml.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/parts/document.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/parts/hdrftr.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/parts/image.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/parts/numbering.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/parts/settings.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/parts/story.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/parts/styles.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/py.typed +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/sanitize/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/sanitize/cleaner.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/sanitize/result.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/section.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/settings.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/shape.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/shared.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/styles/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/styles/latent.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/styles/style.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/styles/styles.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/table.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-comments.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-docx-template/[Content_Types].xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-docx-template/_rels/.rels +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-docx-template/customXml/_rels/item1.xml.rels +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-docx-template/customXml/item1.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-docx-template/customXml/itemProps1.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-docx-template/docProps/app.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-docx-template/docProps/core.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-docx-template/docProps/thumbnail.jpeg +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-docx-template/word/_rels/document.xml.rels +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-docx-template/word/document.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-docx-template/word/fontTable.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-docx-template/word/numbering.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-docx-template/word/settings.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-docx-template/word/styles.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-docx-template/word/stylesWithEffects.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-docx-template/word/theme/theme1.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-docx-template/word/webSettings.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-footer.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-header.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-numbering.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-settings.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default-styles.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/templates/default.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/text/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/text/font.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/text/hyperlink.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/text/pagebreak.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/text/paragraph.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/text/parfmt.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/text/run.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/text/tabstops.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/docx/types.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/python_docx_oss.egg-info/dependency_links.txt +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/python_docx_oss.egg-info/requires.txt +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/src/python_docx_oss.egg-info/top_level.txt +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/conftest.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/dml/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/dml/test_color.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/fixtures/README.md +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/fixtures/comments/word-comments-rich.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/fixtures/customxml/generate_fixture.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/fixtures/customxml/multiple-custom-xml-parts.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/fixtures/documents/word-blank.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/fixtures/drawing/word-floating-picture.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/fixtures/fonts/word-east-asian-fonts.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/fixtures/images/word-svg-image.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/image/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/image/test_bmp.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/image/test_emf.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/image/test_gif.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/image/test_helpers.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/image/test_image.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/image/test_jpeg.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/image/test_png.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/image/test_svg.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/image/test_tiff.py +0 -0
- {python_docx_oss-0.3.3/tests/opc → python_docx_oss-0.4.0/tests/inspection}/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/integration/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/integration/customxml/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/integration/customxml/test_custom_xml_roundtrip.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/integration/test_word_roundtrip.py +0 -0
- {python_docx_oss-0.3.3/tests/opc/parts → python_docx_oss-0.4.0/tests/opc}/__init__.py +0 -0
- {python_docx_oss-0.3.3/tests/opc/unitdata → python_docx_oss-0.4.0/tests/opc/parts}/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/opc/parts/test_coreprops.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/opc/parts/test_customprops.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/opc/test_coreprops.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/opc/test_customprops.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/opc/test_oxml.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/opc/test_package.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/opc/test_packuri.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/opc/test_part.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/opc/test_phys_pkg.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/opc/test_pkgreader.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/opc/test_pkgwriter.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/opc/test_rel.py +0 -0
- {python_docx_oss-0.3.3/tests/oxml → python_docx_oss-0.4.0/tests/opc/unitdata}/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/opc/unitdata/rels.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/opc/unitdata/types.py +0 -0
- {python_docx_oss-0.3.3/tests/oxml/parts → python_docx_oss-0.4.0/tests/oxml}/__init__.py +0 -0
- {python_docx_oss-0.3.3/tests/oxml/parts/unitdata → python_docx_oss-0.4.0/tests/oxml/parts}/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/parts/test_document.py +0 -0
- {python_docx_oss-0.3.3/tests/oxml/text → python_docx_oss-0.4.0/tests/oxml/parts/unitdata}/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/parts/unitdata/document.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/test__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/test_comments.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/test_document.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/test_ns.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/test_section.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/test_styles.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/test_table.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/test_xmlchemy.py +0 -0
- {python_docx_oss-0.3.3/tests/oxml/unitdata → python_docx_oss-0.4.0/tests/oxml/text}/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/text/test_hyperlink.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/text/test_run.py +0 -0
- {python_docx_oss-0.3.3/tests/parts → python_docx_oss-0.4.0/tests/oxml/unitdata}/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/unitdata/dml.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/unitdata/numbering.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/unitdata/section.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/unitdata/shared.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/unitdata/styles.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/unitdata/table.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/oxml/unitdata/text.py +0 -0
- {python_docx_oss-0.3.3/tests/styles → python_docx_oss-0.4.0/tests/parts}/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/parts/test_comments.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/parts/test_customxml.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/parts/test_document.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/parts/test_hdrftr.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/parts/test_image.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/parts/test_numbering.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/parts/test_settings.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/parts/test_story.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/parts/test_styles.py +0 -0
- {python_docx_oss-0.3.3/tests/text → python_docx_oss-0.4.0/tests/styles}/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/styles/test_latent.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/styles/test_style.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/styles/test_styles.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_api.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_blkcntnr.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_comments.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_document.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_drawing.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_enum.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/150-dpi.png +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/300-dpi.TIF +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/300-dpi.jpg +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/300-dpi.png +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/72-dpi.tiff +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/CVS_LOGO.WMF +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/blk-inner-content.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/exif-420-dpi.jpg +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/expanded_docx/[Content_Types].xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/expanded_docx/_rels/.rels +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/expanded_docx/customXml/_rels/item1.xml.rels +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/expanded_docx/customXml/item1.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/expanded_docx/customXml/itemProps1.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/expanded_docx/docProps/app.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/expanded_docx/docProps/core.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/expanded_docx/docProps/thumbnail.jpeg +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/expanded_docx/word/_rels/document.xml.rels +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/expanded_docx/word/document.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/expanded_docx/word/fontTable.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/expanded_docx/word/numbering.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/expanded_docx/word/settings.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/expanded_docx/word/styles.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/expanded_docx/word/stylesWithEffects.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/expanded_docx/word/theme/theme1.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/expanded_docx/word/webSettings.xml +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/having-images.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/jfif-iguana.jpg +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/jpeg_without_app0_and_app1.jpg +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/little-endian.tif +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/monty-truth.png +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/python-icon.jpeg +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/python-icon.png +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/python-powered.png +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/python.bmp +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/sct-inner-content.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/snippets/add-row-col.txt +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/snippets/inline.txt +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/snippets/new-tbl.txt +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/snippets/tbl-cells.txt +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/sonic.emf +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/sonic.gif +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_files/test.docx +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_package.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_sanitize.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_section.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_settings.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_shape.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_shared.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/test_table.py +0 -0
- {python_docx_oss-0.3.3/tests/unitutil → python_docx_oss-0.4.0/tests/text}/__init__.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/text/test_font.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/text/test_hyperlink.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/text/test_pagebreak.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/text/test_paragraph.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/text/test_parfmt.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/text/test_run.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/text/test_tabstops.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/unitdata.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/unitutil/cxml.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/unitutil/file.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tests/unitutil/mock.py +0 -0
- {python_docx_oss-0.3.3 → python_docx_oss-0.4.0}/tox.ini +0 -0
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
## Release History
|
|
2
2
|
|
|
3
|
+
**0.4.0 (2026-10-29)**
|
|
4
|
+
|
|
5
|
+
- Added explicit, transactional empty Custom XML repair and conservative hyperlink
|
|
6
|
+
field conversion and run merging, with immutable change reports and selection callbacks.
|
|
7
|
+
- Added read-only package inspection with immutable inventories, structured findings,
|
|
8
|
+
empty and whitespace-only XML detection, and streaming hyperlink feature detection
|
|
9
|
+
across Word story parts.
|
|
10
|
+
- Added configurable SHA-256 package fingerprints with incremental payload processing,
|
|
11
|
+
XML canonicalization, and explicit part, relationship, and XML exclusions.
|
|
12
|
+
|
|
3
13
|
**0.3.3 (2026-09-10)**
|
|
4
14
|
|
|
5
15
|
- Switched PyPI distribution to GitHub Actions automated releases using PyPI Trusted Publishing (OIDC).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-docx-oss
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Create, read, and update Microsoft Word .docx files.
|
|
5
5
|
Author: Ethan St Lee
|
|
6
6
|
License-Expression: MIT
|
|
@@ -66,7 +66,10 @@ or low-level package and relationship access.
|
|
|
66
66
|
| Low-level OPC parts and relationships | Stable | `document.part.package`, `part.rels` |
|
|
67
67
|
| In-memory read, export, and independent copies | Stable | `Document()`, `to_bytes()`, `copy()` |
|
|
68
68
|
| Document sanitization | Development | `document.sanitize()` |
|
|
69
|
-
|
|
|
69
|
+
| Read-only package inspection and story feature scanning | Development | `inspect()` |
|
|
70
|
+
| Configurable package-content fingerprints | Development | `fingerprint()`, `FingerprintPolicy` |
|
|
71
|
+
| Explicit empty Custom XML repair and hyperlink normalization | Development | `repair()`, `normalize()` |
|
|
72
|
+
| Package and semantic diff | Planned | — |
|
|
70
73
|
|
|
71
74
|
## Installation
|
|
72
75
|
|
|
@@ -116,6 +119,42 @@ document.save("output.docx")
|
|
|
116
119
|
|
|
117
120
|
## Advanced Capabilities
|
|
118
121
|
|
|
122
|
+
### Package inspection and fingerprints
|
|
123
|
+
|
|
124
|
+
Inspect damaged documents before opening them, without loading media payloads:
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
from docx import FingerprintPolicy, fingerprint, inspect
|
|
128
|
+
|
|
129
|
+
report = inspect("input.docx")
|
|
130
|
+
for finding in report.findings:
|
|
131
|
+
print(finding.code, finding.partname)
|
|
132
|
+
|
|
133
|
+
digest = fingerprint("input.docx", policy=FingerprintPolicy(exclude_parts=("docProps/*",)))
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
These APIs leave inputs unchanged and restore seekable stream positions. Fingerprints
|
|
137
|
+
ignore ZIP metadata and member ordering; all content is included unless explicitly
|
|
138
|
+
excluded. See [Package inspection and fingerprints](docs/user/inspection.rst) for
|
|
139
|
+
finding codes, XML comparison semantics, and policy rules.
|
|
140
|
+
|
|
141
|
+
### Explicit repair and normalization
|
|
142
|
+
|
|
143
|
+
```python
|
|
144
|
+
from docx import normalize, repair
|
|
145
|
+
|
|
146
|
+
repaired = repair(source_bytes, empty_custom_xml=True)
|
|
147
|
+
if repaired.report.succeeded:
|
|
148
|
+
normalized = normalize(repaired.content, hyperlink_fields=True, hyperlink_runs=True)
|
|
149
|
+
if normalized.report.succeeded:
|
|
150
|
+
output_bytes = normalized.content
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Operations are disabled by default. Results include committed changes, skipped cases,
|
|
154
|
+
and errors; validation failures return the original bytes. See
|
|
155
|
+
[Repair and normalization](docs/user/transformations.rst) for supported structures,
|
|
156
|
+
selection callbacks, and preservation rules.
|
|
157
|
+
|
|
119
158
|
### Custom properties
|
|
120
159
|
|
|
121
160
|
```python
|
|
@@ -200,8 +239,8 @@ uv run pyright
|
|
|
200
239
|
## Project Status
|
|
201
240
|
|
|
202
241
|
The current focus is stabilizing the independent SDK baseline, its in-memory workflows,
|
|
203
|
-
and
|
|
204
|
-
|
|
242
|
+
sanitization, and read-only package analysis before expanding document comparison,
|
|
243
|
+
composition, and validation APIs.
|
|
205
244
|
|
|
206
245
|
## Credits
|
|
207
246
|
|
|
@@ -37,7 +37,10 @@ or low-level package and relationship access.
|
|
|
37
37
|
| Low-level OPC parts and relationships | Stable | `document.part.package`, `part.rels` |
|
|
38
38
|
| In-memory read, export, and independent copies | Stable | `Document()`, `to_bytes()`, `copy()` |
|
|
39
39
|
| Document sanitization | Development | `document.sanitize()` |
|
|
40
|
-
|
|
|
40
|
+
| Read-only package inspection and story feature scanning | Development | `inspect()` |
|
|
41
|
+
| Configurable package-content fingerprints | Development | `fingerprint()`, `FingerprintPolicy` |
|
|
42
|
+
| Explicit empty Custom XML repair and hyperlink normalization | Development | `repair()`, `normalize()` |
|
|
43
|
+
| Package and semantic diff | Planned | — |
|
|
41
44
|
|
|
42
45
|
## Installation
|
|
43
46
|
|
|
@@ -87,6 +90,42 @@ document.save("output.docx")
|
|
|
87
90
|
|
|
88
91
|
## Advanced Capabilities
|
|
89
92
|
|
|
93
|
+
### Package inspection and fingerprints
|
|
94
|
+
|
|
95
|
+
Inspect damaged documents before opening them, without loading media payloads:
|
|
96
|
+
|
|
97
|
+
```python
|
|
98
|
+
from docx import FingerprintPolicy, fingerprint, inspect
|
|
99
|
+
|
|
100
|
+
report = inspect("input.docx")
|
|
101
|
+
for finding in report.findings:
|
|
102
|
+
print(finding.code, finding.partname)
|
|
103
|
+
|
|
104
|
+
digest = fingerprint("input.docx", policy=FingerprintPolicy(exclude_parts=("docProps/*",)))
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
These APIs leave inputs unchanged and restore seekable stream positions. Fingerprints
|
|
108
|
+
ignore ZIP metadata and member ordering; all content is included unless explicitly
|
|
109
|
+
excluded. See [Package inspection and fingerprints](docs/user/inspection.rst) for
|
|
110
|
+
finding codes, XML comparison semantics, and policy rules.
|
|
111
|
+
|
|
112
|
+
### Explicit repair and normalization
|
|
113
|
+
|
|
114
|
+
```python
|
|
115
|
+
from docx import normalize, repair
|
|
116
|
+
|
|
117
|
+
repaired = repair(source_bytes, empty_custom_xml=True)
|
|
118
|
+
if repaired.report.succeeded:
|
|
119
|
+
normalized = normalize(repaired.content, hyperlink_fields=True, hyperlink_runs=True)
|
|
120
|
+
if normalized.report.succeeded:
|
|
121
|
+
output_bytes = normalized.content
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Operations are disabled by default. Results include committed changes, skipped cases,
|
|
125
|
+
and errors; validation failures return the original bytes. See
|
|
126
|
+
[Repair and normalization](docs/user/transformations.rst) for supported structures,
|
|
127
|
+
selection callbacks, and preservation rules.
|
|
128
|
+
|
|
90
129
|
### Custom properties
|
|
91
130
|
|
|
92
131
|
```python
|
|
@@ -171,8 +210,8 @@ uv run pyright
|
|
|
171
210
|
## Project Status
|
|
172
211
|
|
|
173
212
|
The current focus is stabilizing the independent SDK baseline, its in-memory workflows,
|
|
174
|
-
and
|
|
175
|
-
|
|
213
|
+
sanitization, and read-only package analysis before expanding document comparison,
|
|
214
|
+
composition, and validation APIs.
|
|
176
215
|
|
|
177
216
|
## Credits
|
|
178
217
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
.. _inspection_api:
|
|
2
|
+
|
|
3
|
+
Package inspection and fingerprinting
|
|
4
|
+
============================================
|
|
5
|
+
|
|
6
|
+
.. automodule:: docx.inspection
|
|
7
|
+
:members: inspect, fingerprint, FingerprintPolicy, PackageInspection,
|
|
8
|
+
PackageInventory, PartInventory, RelationshipInventory, Finding, Features
|
|
9
|
+
|
|
10
|
+
See :ref:`package_inspection` for finding codes, exclusions, scan scope, and
|
|
11
|
+
resource guarantees.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Package transformation APIs
|
|
2
|
+
============================================
|
|
3
|
+
|
|
4
|
+
.. automodule:: docx.transforms
|
|
5
|
+
:members: repair, normalize, TransformationResult, TransformationReport, Change,
|
|
6
|
+
HyperlinkTarget
|
|
7
|
+
|
|
8
|
+
See :ref:`package_transformations` for repair eligibility, supported hyperlink
|
|
9
|
+
structures, transactional errors, and preservation guarantees.
|
|
@@ -97,6 +97,8 @@ User Guide
|
|
|
97
97
|
user/styles-using
|
|
98
98
|
user/comments
|
|
99
99
|
user/sanitization
|
|
100
|
+
user/inspection
|
|
101
|
+
user/transformations
|
|
100
102
|
user/shapes
|
|
101
103
|
user/custom-properties
|
|
102
104
|
user/custom-xml
|
|
@@ -117,6 +119,8 @@ API Documentation
|
|
|
117
119
|
api/section
|
|
118
120
|
api/comments
|
|
119
121
|
api/sanitize
|
|
122
|
+
api/inspection
|
|
123
|
+
api/transforms
|
|
120
124
|
api/shape
|
|
121
125
|
api/dml
|
|
122
126
|
api/shared
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
.. _package_inspection:
|
|
2
|
+
|
|
3
|
+
Inspecting packages and comparing content
|
|
4
|
+
================================================
|
|
5
|
+
|
|
6
|
+
``inspect()`` observes a DOCX before it can be opened as a ``Document``. It does
|
|
7
|
+
not repair or rewrite the input. Both inspection and fingerprinting accept a
|
|
8
|
+
filesystem path (including ``pathlib.Path``), raw bytes, or a binary stream::
|
|
9
|
+
|
|
10
|
+
from docx import inspect
|
|
11
|
+
|
|
12
|
+
report = inspect("input.docx")
|
|
13
|
+
for finding in report.findings:
|
|
14
|
+
print(finding.code, finding.partname, finding.target)
|
|
15
|
+
|
|
16
|
+
if report.features.field_hyperlink or report.features.split_hyperlink_runs:
|
|
17
|
+
print("Hyperlink shapes requiring application review were found")
|
|
18
|
+
|
|
19
|
+
The report consists of three immutable values:
|
|
20
|
+
|
|
21
|
+
* ``inventory.parts`` lists ZIP members, uncompressed sizes, Content-Types, and
|
|
22
|
+
whether each member is reachable from package relationships.
|
|
23
|
+
* ``inventory.relationships`` lists source names, IDs, Type URIs, resolved
|
|
24
|
+
internal targets, and external URIs. External targets are never fetched.
|
|
25
|
+
* ``findings`` identifies damaged or suspicious structures. ``features`` records
|
|
26
|
+
Word story facts; it does not decide whether an application should normalize
|
|
27
|
+
or reject a document.
|
|
28
|
+
|
|
29
|
+
Names are package-relative without a leading slash. The relationship source
|
|
30
|
+
``/`` denotes the package root. Internal target paths are resolved relative to
|
|
31
|
+
their source, with URI percent escapes decoded. Reachability does not imply
|
|
32
|
+
that a part is well-formed or safe to open.
|
|
33
|
+
|
|
34
|
+
Findings
|
|
35
|
+
--------
|
|
36
|
+
|
|
37
|
+
Use ``report.has_finding(code)`` or ``report.findings_by_code(code)`` rather than
|
|
38
|
+
matching human-readable exception messages. Findings carry the affected member
|
|
39
|
+
name when one is available, and missing-target findings carry ``target``.
|
|
40
|
+
|
|
41
|
+
.. list-table::
|
|
42
|
+
:header-rows: 1
|
|
43
|
+
:widths: 35 65
|
|
44
|
+
|
|
45
|
+
* - Code
|
|
46
|
+
- Meaning
|
|
47
|
+
* - ``not_a_package``
|
|
48
|
+
- An opened source cannot be read as a ZIP package.
|
|
49
|
+
* - ``missing_content_types``
|
|
50
|
+
- The package has no ``[Content_Types].xml`` member.
|
|
51
|
+
* - ``missing_main_document``
|
|
52
|
+
- No package-root officeDocument relationship resolves to an existing part.
|
|
53
|
+
* - ``invalid_content_types``
|
|
54
|
+
- The Content-Types member has an unexpected root element.
|
|
55
|
+
* - ``invalid_relationships``
|
|
56
|
+
- A relationship member has an unexpected root, missing required attributes,
|
|
57
|
+
duplicate IDs, or an invalid target URI.
|
|
58
|
+
* - ``empty_xml_part``
|
|
59
|
+
- An XML member has zero bytes or contains only XML whitespace.
|
|
60
|
+
* - ``unparseable_xml_part``
|
|
61
|
+
- XML is malformed or uses a DTD, which this API rejects.
|
|
62
|
+
* - ``missing_relationship_target``
|
|
63
|
+
- An internal relationship points to an absent member.
|
|
64
|
+
* - ``unreadable_part``
|
|
65
|
+
- An XML member cannot be decompressed or fails its ZIP integrity check.
|
|
66
|
+
* - ``duplicate_member``
|
|
67
|
+
- The ZIP contains the same member name more than once; inventory uses the first.
|
|
68
|
+
* - ``unsafe_member_name``
|
|
69
|
+
- A ZIP member has an absolute name, backslash, or parent-directory component.
|
|
70
|
+
|
|
71
|
+
All recognizable XML parts are checked, including unreachable XML. A broken
|
|
72
|
+
relationship part does not prevent other parts from being inventoried. Findings
|
|
73
|
+
are observations, not a complete OPC/schema/security validation; an empty list
|
|
74
|
+
does not guarantee that ``Document()`` or Microsoft Word can open the input.
|
|
75
|
+
Invalid source argument types raise ``TypeError``. Source opening failures, such
|
|
76
|
+
as ``FileNotFoundError`` or ``PermissionError``, propagate to the caller rather
|
|
77
|
+
than being classified as package damage. This matches ``repair()`` and ``normalize()``.
|
|
78
|
+
|
|
79
|
+
Story scanning and resource use
|
|
80
|
+
--------------------------------------
|
|
81
|
+
|
|
82
|
+
``field_hyperlink`` detects a first instruction token of ``HYPERLINK``, including
|
|
83
|
+
simple fields (``w:fldSimple/@w:instr``) and complex field instructions split across
|
|
84
|
+
runs. Other commands containing the word, such as ``REF HYPERLINK_ref``, do not
|
|
85
|
+
match. ``split_hyperlink_runs`` detects ``w:hyperlink``
|
|
86
|
+
elements with more than one direct ``w:r`` child. The scanner covers the main
|
|
87
|
+
document and reachable header, footer, footnote, endnote, and comment story parts;
|
|
88
|
+
configuration XML such as styles and settings does not contribute features.
|
|
89
|
+
Transitional and Strict Word namespaces are supported.
|
|
90
|
+
|
|
91
|
+
Inspection reads XML incrementally without building an element tree. Media,
|
|
92
|
+
embedded objects, and other binary member payloads are never opened. Memory use
|
|
93
|
+
scales with package inventory and XML/field nesting depth, rather than story text or
|
|
94
|
+
media size. Metadata lists still scale with the number of parts and relationships.
|
|
95
|
+
Binary payload checksums are therefore not validated by inspection.
|
|
96
|
+
|
|
97
|
+
Seekable streams are read from the beginning, then restored to their original
|
|
98
|
+
position on success or failure. Caller-owned streams are never closed. A
|
|
99
|
+
forward-only stream is consumed and spooled, spilling to a temporary file beyond
|
|
100
|
+
1 MiB. Paths and temporary handles are closed internally.
|
|
101
|
+
|
|
102
|
+
Content fingerprints
|
|
103
|
+
--------------------
|
|
104
|
+
|
|
105
|
+
``fingerprint()`` computes a versioned SHA-256 package-content fingerprint::
|
|
106
|
+
|
|
107
|
+
from docx import FingerprintPolicy, fingerprint
|
|
108
|
+
|
|
109
|
+
unchanged = fingerprint(before_bytes) == fingerprint(after_bytes)
|
|
110
|
+
|
|
111
|
+
policy = FingerprintPolicy(exclude_parts=("docProps/*",))
|
|
112
|
+
unchanged_except_properties = (
|
|
113
|
+
fingerprint(before_bytes, policy=policy)
|
|
114
|
+
== fingerprint(after_bytes, policy=policy)
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
Member ordering, compression, ZIP timestamps, directory entries, and other ZIP
|
|
118
|
+
metadata do not affect the fingerprint. Member names and contents do. XML uses
|
|
119
|
+
C14N 2.0 with comments, which normalizes attribute ordering, quote style, and
|
|
120
|
+
empty-element spelling. Text whitespace and namespace prefixes are preserved.
|
|
121
|
+
This is not a semantic Word comparison: equivalent rendering can produce
|
|
122
|
+
different fingerprints. Compare fingerprints with the same policy and API
|
|
123
|
+
algorithm version; the digest is not compatible with arbitrary existing hashes.
|
|
124
|
+
|
|
125
|
+
The default includes document properties, Custom XML, relationships, and binary
|
|
126
|
+
content. ``FingerprintPolicy`` can explicitly exclude:
|
|
127
|
+
|
|
128
|
+
* ``exclude_parts``: shell-style patterns against member names; ``*`` also
|
|
129
|
+
matches ``/``;
|
|
130
|
+
* ``exclude_relationship_types``: complete relationship Type URIs;
|
|
131
|
+
* ``exclude_xml_tags``: expanded XML names, removing entire subtrees;
|
|
132
|
+
* ``exclude_xml_attributes``: expanded XML attribute names.
|
|
133
|
+
|
|
134
|
+
For example, ``exclude_xml_tags=("{namespace-uri}element",)`` applies to that
|
|
135
|
+
element throughout the package. Excluding a member does not automatically
|
|
136
|
+
exclude relationships or Content-Type declarations that reference it.
|
|
137
|
+
Relationship exclusions do not remove their target parts. Applications must
|
|
138
|
+
choose the complete policy appropriate to their comparison.
|
|
139
|
+
|
|
140
|
+
When XML canonicalization is enabled, ``[Content_Types].xml`` is always read for
|
|
141
|
+
XML classification, even if excluded from the digest. XML parts with nonstandard
|
|
142
|
+
extensions therefore retain the same comparison rules. A malformed or empty
|
|
143
|
+
Content-Types member raises a member-specific ``ValueError`` even when excluded.
|
|
144
|
+
|
|
145
|
+
Set ``canonicalize_xml=False`` to hash XML bytes exactly. XML exclusions cannot
|
|
146
|
+
be combined with that mode. Unlike ``inspect()``, fingerprinting raises on
|
|
147
|
+
unreadable packages or malformed included XML rather than returning a partial
|
|
148
|
+
digest. Duplicate member names are rejected. DTDs are rejected when XML is
|
|
149
|
+
canonicalized. Binary and XML contents are processed incrementally; the function
|
|
150
|
+
does not collect all member payloads in memory. Stream guarantees match
|
|
151
|
+
``inspect()``.
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
.. _package_transformations:
|
|
2
|
+
|
|
3
|
+
Repairing and normalizing packages
|
|
4
|
+
============================================
|
|
5
|
+
|
|
6
|
+
``repair()`` and ``normalize()`` perform explicit package edits. Every operation
|
|
7
|
+
is disabled by default. They accept the same path, bytes, and binary stream
|
|
8
|
+
inputs as :ref:`package_inspection`, and return a ``TransformationResult`` with
|
|
9
|
+
``content`` bytes and an immutable ``report``::
|
|
10
|
+
|
|
11
|
+
from docx import normalize, repair
|
|
12
|
+
|
|
13
|
+
repaired = repair(source_bytes, empty_custom_xml=True)
|
|
14
|
+
if repaired.report.succeeded:
|
|
15
|
+
normalized = normalize(
|
|
16
|
+
repaired.content,
|
|
17
|
+
hyperlink_fields=True,
|
|
18
|
+
hyperlink_runs=True,
|
|
19
|
+
)
|
|
20
|
+
if normalized.report.succeeded:
|
|
21
|
+
output_bytes = normalized.content
|
|
22
|
+
|
|
23
|
+
Inputs are never overwritten. Seekable streams are read from the beginning and
|
|
24
|
+
their positions restored; borrowed streams stay open. Forward-only streams are
|
|
25
|
+
consumed. Source access failures and invalid argument types raise because original
|
|
26
|
+
bytes cannot be obtained. Application selector exceptions also propagate.
|
|
27
|
+
|
|
28
|
+
Reports and transactional behavior
|
|
29
|
+
--------------------------------------------
|
|
30
|
+
|
|
31
|
+
The report exposes:
|
|
32
|
+
|
|
33
|
+
* ``before`` and ``after``: package inspection reports for the original and
|
|
34
|
+
returned content;
|
|
35
|
+
* ``changes``: committed operations with member name, count, and, where relevant,
|
|
36
|
+
relationship ID and target;
|
|
37
|
+
* ``skipped``: unsupported or unselected hyperlink operations, with member context;
|
|
38
|
+
* ``errors``: conditions that prevented the operation;
|
|
39
|
+
* ``succeeded``: whether the operation completed without errors;
|
|
40
|
+
* ``changed``: whether any changes were committed.
|
|
41
|
+
|
|
42
|
+
When all options are disabled, the original bytes are returned with an inspection
|
|
43
|
+
report, without attempting repair or document-open validation. Existing findings
|
|
44
|
+
remain visible in ``before``; ``succeeded`` does not imply those findings were fixed.
|
|
45
|
+
|
|
46
|
+
With an operation enabled, input inspection runs first. Unsupported damage blocks
|
|
47
|
+
the operation. A candidate is inspected again and opened as a ``Document``; its
|
|
48
|
+
main part must be a supported Word document with a body. On failure, the original
|
|
49
|
+
bytes are returned, ``errors`` explains why, and ``changes`` is empty. Thus
|
|
50
|
+
``after`` always describes the bytes actually returned. Successful operations may
|
|
51
|
+
still contain ``skipped`` entries; inspect those before assuming every hyperlink
|
|
52
|
+
was normalized.
|
|
53
|
+
|
|
54
|
+
This validates package relationships and library readability, not full OOXML
|
|
55
|
+
schema conformance or Microsoft Word rendering. Operations currently target the
|
|
56
|
+
Transitional Word namespace supported by ``Document()``.
|
|
57
|
+
|
|
58
|
+
Empty Custom XML repair
|
|
59
|
+
--------------------------------------------
|
|
60
|
+
|
|
61
|
+
``repair(source, empty_custom_xml=True)`` replaces empty Custom XML data with
|
|
62
|
+
``<root/>``. Eligibility requires both:
|
|
63
|
+
|
|
64
|
+
* all incoming internal relationships to the part are ``customXml``; and
|
|
65
|
+
* the Content-Type is generic ``application/xml`` or ``text/xml``.
|
|
66
|
+
|
|
67
|
+
Zero-byte and XML-whitespace-only parts qualify as empty. The original schema,
|
|
68
|
+
business tags, or lost data cannot be reconstructed: the replacement is a neutral
|
|
69
|
+
well-formed placeholder. The report records ``filled_empty_custom_xml`` for each
|
|
70
|
+
part. Relationships, Custom XML properties, and other package members are retained.
|
|
71
|
+
|
|
72
|
+
The API does not fill empty main documents, headers, Custom XML properties, or
|
|
73
|
+
unidentified orphan XML. Malformed nonempty XML and other inspection findings
|
|
74
|
+
cause the whole repair to fail, preserving the original bytes. Run normalization
|
|
75
|
+
separately after a successful repair. Repeating repair on its output is a byte
|
|
76
|
+
identical no-op.
|
|
77
|
+
|
|
78
|
+
Hyperlink normalization
|
|
79
|
+
--------------------------------------------
|
|
80
|
+
|
|
81
|
+
``hyperlink_fields=True`` converts supported ``HYPERLINK`` fields into standard
|
|
82
|
+
``w:hyperlink`` elements. It handles simple fields and paragraph-local complex
|
|
83
|
+
fields with separate begin, instruction, separator, result, and end runs. Field
|
|
84
|
+
instructions may span runs. Result runs retain their text and formatting.
|
|
85
|
+
|
|
86
|
+
Supported targets include quoted or unquoted addresses, bookmark-only links,
|
|
87
|
+
and address plus bookmark. Supported switches are ``\l`` (anchor), ``\o``
|
|
88
|
+
(tooltip), ``\t`` (target frame), and ``\* MERGEFORMAT``. Unknown switches,
|
|
89
|
+
locked or nested fields, revision markup, mixed delimiter/content runs, and
|
|
90
|
+
bookmark or comment range boundaries are left unchanged and reported. Other
|
|
91
|
+
field types, such as TOC and REF, are untouched.
|
|
92
|
+
|
|
93
|
+
Quoted field arguments decode escaped backslashes and escaped double quotes.
|
|
94
|
+
Unknown or malformed escapes, unclosed strings, and doubled-quote notation are
|
|
95
|
+
preserved and reported as skipped rather than converted into potentially wrong targets.
|
|
96
|
+
|
|
97
|
+
External hyperlink relationships are reused when possible. New IDs avoid existing
|
|
98
|
+
IDs in that story part. Missing relationship members and their Content-Type
|
|
99
|
+
declarations are added when needed. Main document, headers, footers, footnotes,
|
|
100
|
+
endnotes, and comments are processed through their reachable story relationships.
|
|
101
|
+
|
|
102
|
+
``hyperlink_runs=True`` merges adjacent text-only runs inside a hyperlink only
|
|
103
|
+
when explicit run properties and attributes other than ``w:rsidR`` and
|
|
104
|
+
``w:rsidRPr`` match. The surviving run retains its original session identifiers;
|
|
105
|
+
per-run session provenance is coalesced. Text and spaces are preserved.
|
|
106
|
+
Different formatting, other attributes (including ``w:rsidDel``), drawings,
|
|
107
|
+
tabs, breaks, revision containers,
|
|
108
|
+
and intervening markup prevent merging across that boundary. Safe adjacent groups
|
|
109
|
+
can still be merged while unsupported groups are reported as skipped.
|
|
110
|
+
|
|
111
|
+
Application-owned selection
|
|
112
|
+
--------------------------------------------
|
|
113
|
+
|
|
114
|
+
The optional ``select_hyperlink`` callback receives an immutable
|
|
115
|
+
``HyperlinkTarget(partname, address, anchor)``. Return ``True`` to select a
|
|
116
|
+
supported field conversion or existing-link run merge::
|
|
117
|
+
|
|
118
|
+
def select_link(target):
|
|
119
|
+
return target.address is not None and target.address.startswith(
|
|
120
|
+
"https://example.test/documents/"
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
result = normalize(
|
|
124
|
+
source_bytes,
|
|
125
|
+
hyperlink_fields=True,
|
|
126
|
+
hyperlink_runs=True,
|
|
127
|
+
select_hyperlink=select_link,
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
Without a callback all supported hyperlinks are selected. The SDK contains no
|
|
131
|
+
application URL or tag rules. For existing hyperlinks ``address`` comes from the
|
|
132
|
+
story relationship target; bookmark-only links have ``address=None``. The callback
|
|
133
|
+
must be deterministic: it may be called for conversion and then again for merging
|
|
134
|
+
the resulting link. Returning ``False`` is reported as skipped.
|
|
135
|
+
|
|
136
|
+
Preservation and resource use
|
|
137
|
+
--------------------------------------------
|
|
138
|
+
|
|
139
|
+
Only edited XML members are serialized. Other member contents, including opaque
|
|
140
|
+
media, embedded objects, macros, unknown XML, and unreachable parts, are copied
|
|
141
|
+
unchanged. ZIP member metadata and archive comments are retained where supported
|
|
142
|
+
by Python's ZIP writer; compressed bytes and ZIP offsets may change. The package
|
|
143
|
+
is not saved through ``Document`` during transformation.
|
|
144
|
+
|
|
145
|
+
These editing APIs retain input and output bytes, build a tree for the story
|
|
146
|
+
currently being edited, and open the result for validation. They do not have the
|
|
147
|
+
streaming memory profile of ``inspect()``. No-op results retain the original bytes
|
|
148
|
+
exactly. Repeated normalization with the same deterministic selection is a byte
|
|
149
|
+
identical no-op once supported changes have been applied.
|
|
Binary file
|
|
@@ -9,14 +9,16 @@ from __future__ import annotations
|
|
|
9
9
|
from typing import TYPE_CHECKING, Type
|
|
10
10
|
|
|
11
11
|
from docx.api import Document
|
|
12
|
+
from docx.inspection import FingerprintPolicy, fingerprint, inspect
|
|
13
|
+
from docx.transforms import normalize, repair
|
|
12
14
|
|
|
13
15
|
if TYPE_CHECKING:
|
|
14
16
|
from docx.opc.part import Part
|
|
15
17
|
|
|
16
|
-
__version__ = "0.
|
|
18
|
+
__version__ = "0.4.0"
|
|
17
19
|
|
|
18
20
|
|
|
19
|
-
__all__ = ["Document"]
|
|
21
|
+
__all__ = ["Document", "FingerprintPolicy", "fingerprint", "inspect", "normalize", "repair"]
|
|
20
22
|
|
|
21
23
|
|
|
22
24
|
# -- register custom Part classes with opc package reader --
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""Read-only package inspection and configurable content fingerprints."""
|
|
2
|
+
|
|
3
|
+
from docx.inspection.fingerprint import FingerprintPolicy, fingerprint
|
|
4
|
+
from docx.inspection.reader import inspect
|
|
5
|
+
from docx.inspection.result import (
|
|
6
|
+
Features,
|
|
7
|
+
Finding,
|
|
8
|
+
PackageInspection,
|
|
9
|
+
PackageInventory,
|
|
10
|
+
PartInventory,
|
|
11
|
+
RelationshipInventory,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"Features",
|
|
16
|
+
"Finding",
|
|
17
|
+
"FingerprintPolicy",
|
|
18
|
+
"PackageInspection",
|
|
19
|
+
"PackageInventory",
|
|
20
|
+
"PartInventory",
|
|
21
|
+
"RelationshipInventory",
|
|
22
|
+
"fingerprint",
|
|
23
|
+
"inspect",
|
|
24
|
+
]
|