Merge branch 'development'
This commit is contained in:
commit
488d70a42f
3 changed files with 8 additions and 4 deletions
|
|
@ -156,6 +156,7 @@ Pad zeroes to `value` to the left until output value's length be equal to `lengt
|
||||||
Secretary supports most of the jinja2 control structure/flow tags. But please avoid using the following tags since they are not supported: `block`, `extends`, `macro`, `call`, `include` and `import`.
|
Secretary supports most of the jinja2 control structure/flow tags. But please avoid using the following tags since they are not supported: `block`, `extends`, `macro`, `call`, `include` and `import`.
|
||||||
|
|
||||||
### Version History
|
### Version History
|
||||||
|
* **0.2.3**: Fix issue [#13](https://github.com/christopher-ramirez/secretary/issues/12).
|
||||||
* **0.2.2**: Introduce image support.
|
* **0.2.2**: Introduce image support.
|
||||||
* **0.2.1**: Fix issue [#8](https://github.com/christopher-ramirez/secretary/issues/8)
|
* **0.2.1**: Fix issue [#8](https://github.com/christopher-ramirez/secretary/issues/8)
|
||||||
* **0.2.0**: **Backward incompatible release**. Still compatible with existing templates. Introduce auto flow handling, better logging and minor bug fixes.
|
* **0.2.0**: **Backward incompatible release**. Still compatible with existing templates. Introduce auto flow handling, better logging and minor bug fixes.
|
||||||
|
|
|
||||||
|
|
@ -452,7 +452,6 @@ class Renderer(object):
|
||||||
self.replace_images(final_xml)
|
self.replace_images(final_xml)
|
||||||
|
|
||||||
return final_xml
|
return final_xml
|
||||||
|
|
||||||
except:
|
except:
|
||||||
self.log.error('Error rendering template:\n%s',
|
self.log.error('Error rendering template:\n%s',
|
||||||
xml_document.toprettyxml(), exc_info=True)
|
xml_document.toprettyxml(), exc_info=True)
|
||||||
|
|
@ -483,8 +482,12 @@ class Renderer(object):
|
||||||
self.styles = parseString(self.files['styles.xml'])
|
self.styles = parseString(self.files['styles.xml'])
|
||||||
self.manifest = parseString(self.files['META-INF/manifest.xml'])
|
self.manifest = parseString(self.files['META-INF/manifest.xml'])
|
||||||
|
|
||||||
# Render content.xml
|
# Render content.xml keeping just 'office:body' node.
|
||||||
self.content = self._render_xml(self.content, **kwargs)
|
rendered_content = self._render_xml(self.content, **kwargs)
|
||||||
|
self.content.getElementsByTagName('office:document-content')[0].replaceChild(
|
||||||
|
rendered_content.getElementsByTagName('office:body')[0],
|
||||||
|
self.content.getElementsByTagName('office:body')[0]
|
||||||
|
)
|
||||||
|
|
||||||
# Render styles.xml
|
# Render styles.xml
|
||||||
self.styles = self._render_xml(self.styles, **kwargs)
|
self.styles = self._render_xml(self.styles, **kwargs)
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -26,7 +26,7 @@ class PyTest(TestCommand):
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='secretary',
|
name='secretary',
|
||||||
version='0.2.2',
|
version='0.2.3',
|
||||||
url='https://github.com/christopher-ramirez/secretary',
|
url='https://github.com/christopher-ramirez/secretary',
|
||||||
license='MIT',
|
license='MIT',
|
||||||
author='Christopher Ramírez',
|
author='Christopher Ramírez',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue