Overview
Creation and manipulation of Open XML documents (mainly docx).
Free software: MIT license
Features
This library allow you to:
Convert Open XML documents into flat OPC format.
Installation
pip install docx-utils
Using the library
Using the library to convert an Open XML document into flat OPC format:
>>> from docx_utils.flatten import opc_to_flat_opc
>>> opc_to_flat_opc("sample.docx", "sample.xml")
Command Line Interface (CLI)
Printing the online help:
$ docx_utils --help
Usage: docx_utils [OPTIONS] COMMAND [ARGS]...
Docx utilities
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
flatten Convert an Open XML document into flat OPC format.
Converting an Open XML document into flat OPC format:
$ docx_utils flatten sample.docx sample.xml
Converting 'sample.docx' to flat XML...
Conversion done: 'sample.xml'.
Documentation
Development
To run the all tests run:
tox
Changelog
v0.1.3 (2020-07-15)
Fixed
Correct the project’s dependencies: Enum34 is only required for Python versions < 3.4.
Add the docx_utils.exceptions module: Exception hierarchy for the docx-utils package.
Fix #1:
Add the on_error option in the docx_utils.flatten.opc_to_flat_opc function in order to ignore (or raise an exception) when a part URI cannot be resolved during the Microsoft Office document parsing.
Change the command line interface: add the --on-error option to handle parsing error.
Other
Continuous Integration: add configurations for Python 3.7 and Python 3.8.
v0.1.2 (2018-07-26)
Fixed
Drop support for PyPy: it seams that lxml is not available for this Python implementation.
Drop support for Python 3.7: this Python version is not yet available on all platform. However, it is known to work on Ubuntu with the python-3.7-dev release.
Other
Use the pseudo-tags start-exclude/end-exclude in CHANGELOG.rst and README.rst to exclude text from the generated PKG-INFO during setup.
v0.1.1 (2018-07-25)
Fixed
Fix wheel version on PyPi.
v0.1.1 (2018-07-24)
Added
First release.
Metadata
Release files for docx-utils 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| docx_utils-0.1.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for docx_utils-0.1.3-py2.py3-none-any.whl |
Release files / docx_utils-0.1.3-py2.py3-none-any.whl
| Download URL | docx_utils-0.1.3-py2.py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
eeca16c8cbde9fe2fb9c58bf26122731d21f41d19fe19167d509c40181039acb
|
|
BLAKE2b-256 checksum How to use checksums |
8b92d5ef0b41e5a385714ed15097cc08a8acd60607b4a9098223aadf9f81638e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.2
|
Security for docx-utils 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.