创建和操作开放的xml文档(主要是docx)。
docx-utils的Python项目详细描述
概述
创建和操作开放的xml文档(主要是docx)。
- 自由软件:麻省理工学院许可证
功能
此库允许您:
- 将打开的XML文档转换为扁平的OPC格式。
安装
pip install docx-utils
使用库
使用库将打开的XML文档转换为扁平的OPC格式:
>>>fromdocx_utils.flattenimportopc_to_flat_opc>>>opc_to_flat_opc("sample.docx","sample.xml")
命令行界面(cli)
打印联机帮助:
$ 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.
将打开的XML文档转换为扁平的OPC格式:
$ docx_utils flatten sample.docx sample.xml Converting 'sample.docx' to flat XML... Conversion done: 'sample.xml'.
发展
要运行所有测试,请运行:
tox
更改日志
V0.1.2(2018-07-26)
已修复
- 放弃对pypy的支持:这表明lxml不可用于此python实现。
- 放弃对Python3.7的支持:这个Python版本在所有平台上都不可用。 不过,众所周知,它在ubuntu上使用python-3.7-dev版本。
其他
- 使用CHANGELOG.rst和^{tt4}中的伪标记start-exclude/end-exclude。$ 在安装过程中从生成的PKG-INFO中排除文本。
V0.1.1(2018-07-25)
已修复
- 修复pypi上的轮子版本。
V0.1.1(2018-07-24)
已添加
- 第一次释放。