diff --git a/CHANGES.rst b/CHANGES.rst index ddc24f8..d45a604 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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 \ No newline at end of file +- First running version \ No newline at end of file diff --git a/docxtpl/__init__.py b/docxtpl/__init__.py index c882275..a315e1f 100644 --- a/docxtpl/__init__.py +++ b/docxtpl/__init__.py @@ -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'](?:(?!]).)*{%\s*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) diff --git a/setup.py b/setup.py index 4639474..e3f6b9c 100644 --- a/setup.py +++ b/setup.py @@ -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=[