remove debug code

This commit is contained in:
elapouya 2015-03-13 12:17:17 +01:00
parent e9b9a8bf3f
commit 80a10956ed
3 changed files with 3 additions and 20 deletions

View File

@ -1,14 +1,3 @@
0.1.7 (2015-01-02)
0.1.2 (2015-03-13)
------------------
- add CHANGES.rst file
- add a Quickstat in documentation
0.1.6 (2015-01-01)
------------------
- add docstrings
- add sphinx doc
0.1.1 (2014-12-30)
------------------
- First commit
- No doc
- First running version

View File

@ -24,9 +24,6 @@ class DocxTemplate(object):
def build_xml(self,context):
src_xml = etree.tostring(self.docx._element.body, pretty_print=True)
with open('/tmp/docx1.xml','w') as fh:
fh.write(src_xml)
# strip all xml tags inside {% %} and {{ }}
# that Microsoft word can insert into xml code for this part of the document
def striptags(m):
@ -49,9 +46,6 @@ class DocxTemplate(object):
# replace xml code corresponding to the paragraph containing {% p-xxx template tag by {% xxx template tag itself
src_xml = re.sub(r'<w:p[ >](?:(?!<w:p[ >]).)*{%\s*p-([^%]*%}).*?</w:p>',r'{% \1',src_xml,flags=re.DOTALL)
with open('/tmp/docx2.xml','w') as fh:
fh.write(src_xml)
template = Template(src_xml)
dst_xml = template.render(context)

View File

@ -24,7 +24,7 @@ News
""" % read('README', 'CHANGES')
setup(name='docxtpl',
version='0.1.1',
version='0.1.2',
description='Python docx template engine',
long_description=long_description,
classifiers=[