python-docx-template:使用docx作为jinja2模板

时间:2021-04-28 20:02:32
【文件属性】:
文件名称:python-docx-template:使用docx作为jinja2模板
文件大小:1.13MB
文件格式:ZIP
更新时间:2021-04-28 20:02:32
Python python-docx-template 使用docx作为jinja2模板 介绍 该软件包使用2个主要软件包: 用于读取,编写和创建子文档的python-docx jinja2用于管理插入到模板docx中的标签 之所以创建python-docx-template,是因为python-docx具有创建文档但不能修改文档的强大功能。 这个想法是开始创建您要使用Microsoft Word生成的文档的示例,它可以随您的需要而复杂:图片,索引表,页脚,页眉,变量,以及您可以使用Word进行的任何操作。 然后,由于您仍在使用Microsoft Word编辑文档,因此可以在文档中直接插入类似jinja2的标签。 您将文档另存为.docx文件(xml格式):它将是您的.docx模板文件。 现在,您可以使用python-docx-template从此.docx模板和关联的上下文变量生成所需的wo
【文件预览】:
python-docx-template-master
----setup.py(2KB)
----.gitignore(759B)
----requirements.txt(28B)
----.pydevproject(302B)
----CHANGES.rst(5KB)
----MANIFEST.in(47B)
----Pipfile.lock(10KB)
----setup.cfg(27B)
----LICENSE.txt(26KB)
----.github()
--------workflows()
----README.rst(1KB)
----tests()
--------header_footer_utf8.py(581B)
--------vertical_merge.py(523B)
--------templates()
--------header_footer_image_file_obj.py(863B)
--------replace_picture.py(327B)
--------__init__.py(0B)
--------horizontal_merge.py(173B)
--------inline_image.py(2KB)
--------header_footer_entities.py(299B)
--------merge_paragraph.py(274B)
--------richtext.py(1KB)
--------template_error.py(679B)
--------preserve_spaces.py(414B)
--------word2016.py(311B)
--------escape_auto.py(611B)
--------header_footer_image.py(399B)
--------richtext_and_if.py(301B)
--------less_cells_after_loop.py(158B)
--------dynamic_table.py(495B)
--------cellbg.py(931B)
--------runtests.py(402B)
--------nested_for.py(1KB)
--------subdoc.py(1KB)
--------embedded.py(1KB)
--------header_footer.py(494B)
--------header_footer_inline_image.py(470B)
--------custom_jinja_filters.py(869B)
--------vertical_merge_nested.py(158B)
--------order.py(604B)
--------escape.py(1KB)
----.project(374B)
----Pipfile(200B)
----docxtpl()
--------__init__.py(32KB)
----docs()
--------Makefile(7KB)
--------index.rst(15KB)
--------conf.py(8KB)

网友评论