ODocxTpl is a simple tool to generate a word document from .docx template and YAML variables (using py-docx-tpl).
- python3.5
- python-argparse
- python-pip - The PyPA recommended tool for installing Python packages
- python-yaml - Python bindings for YAML, using fast libYAML library
Install python-docx-template:
$ pip install docxtpl
Before usage:
$ chmod +x src/odocxtpl.py
$ python odocxtpl.py file1.docx meta.yaml out.docx
- file1.docx: Word document containing context {{ vars }}
- meta.yaml: Variable values
- out.docx: Output file