python-docx-template/tests/merge_docx.py
Eric Lapouyade 6722d63537 code styling
2021-07-31 14:16:23 +02:00

20 lines
320 B
Python

# -*- coding: utf-8 -*-
'''
Created : 2021-07-30
@author: Eric Lapouyade
'''
from docxtpl import DocxTemplate
tpl = DocxTemplate('templates/merge_docx_master_tpl.docx')
sd = tpl.new_subdoc('templates/merge_docx_subdoc.docx')
context = {
'mysubdoc': sd,
}
tpl.render(context)
tpl.save('output/merge_docx.docx')