Skip to content

Creation and manipulation of Open XML documents (mainly docx).

License

Notifications You must be signed in to change notification settings

tantale/docx_utils

Repository files navigation

Overview

docs Documentation Status
tests
Travis-CI Build Status AppVeyor Build Status Requirements Status
Coverage Status
package

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

https://docx-utils.readthedocs.io/en/latest/

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

About

Creation and manipulation of Open XML documents (mainly docx).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages