Overview¶
docs | |
---|---|
tests | |
package |
Creation and manipulation of Open XML documents (mainly docx).
- Free software: MIT license
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
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
|