docs | |
---|---|
tests | |
package |
Creation and manipulation of Open XML documents (mainly docx).
- Free software: MIT license
This library allow you to:
- Convert Open XML documents into flat OPC format.
pip install docx-utils
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")
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'.
https://docx-utils.readthedocs.io/en/latest/
To run the all tests run:
tox
Note, to combine the coverage data from all the tox environments run:
Windows | set PYTEST_ADDOPTS=--cov-append tox |
---|---|
Other | PYTEST_ADDOPTS=--cov-append tox |