toxicphreAK / python-docx-ng

Create and modify Word documents with Python (next-gen)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python-docx-ng

Python Packaging

python-docx-ng is a Python library for creating and updating Microsoft Word (.docx) files. It was originally designed and developed by scanny as python-docx. As he is not actively developing his repo and there are soo many useful pull requests, bringing together a more powerful tool. This repo should merge a lot of those things and create a more powerful version, hopefully bearing the original structure of scanny in mind.

A new documentation section will be build up soon based on Markdown in the docs section. Examples can be found here: examples Older information is available in the python-docx Documentation.

Repo: https://github.com/toxicphreAK/python-docx-ng/blob/master/
Release: https://github.com/toxicphreAK/python-docx-ng/releases
PyPi: https://pypi.org/project/python-docx-ng/

Installation

pip install python-docx-ng

Hint: The library is called docx in python scripts, so use imports like import docx.

Features

  • Extended Properties support python-docx #1206
  • Word 16 (Office 2019) Template (54a1269)
  • Faster & improved tables (#1)
  • SVG support (#4)
  • EMF support (85a30f1)
  • WMF support (9288ec9)
  • Font scaling (#6)
  • Outline level (#7) - shows outline in navigation (e.g. Word or PDF application - not affecting the document itself)
  • RGB color font highlighting (#14)
  • Hyperlink text (#16)
  • .docm file support (#19) - enables marco documents
  • Form fields & AltChunk support (#20)
  • Custom namespaces (#21)
  • Comment support (85a30f1)
  • Footnote support (85a30f1)
  • Shading support (9288ec9)
  • Performance improvements
    • Paragraph.text ([#3}(#3)
    • Cache for table cells (#8)
  • Fixes
    • Fix table issue python-docx#1196 - as table columns were not assigned correctly, see python-docx#1193
    • Fix table merging recusion python-openxml#1208 - replace recursion with for loop
    • add_picture (#10) - fix next_id to support multiple pictures
    • Heading 1 key error due to style capitalization (e.g. in LibreOffice) (#12)
    • Fix XPath for sectPr in document (#15)
    • Reproducible documents (#17) - same binary output with same data
    • AttValue too long in etree xml parser (#24)

Roadmap

  • Document all functionallities building a new sample document with all (most) features included
  • Remove code references to original repo of python-docx
  • Setup new docs (markdown based)
  • Add missing tests

About

Create and modify Word documents with Python (next-gen)

License:MIT License


Languages

Language:Python 93.6%Language:Gherkin 6.3%Language:Makefile 0.1%