First draft for image support.

This commit is contained in:
Christopher Ramírez 2014-09-07 15:24:48 -06:00
parent 75015dd248
commit d285ef7390
4 changed files with 156 additions and 14 deletions

15
samples/images/render.py Normal file
View file

@ -0,0 +1,15 @@
# /usr/bin/activate
import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(__file__, '../../..')))
from secretary import Renderer
if __name__ == '__main__':
engine = Renderer(media_path='.')
template = open('template.odt', 'rb')
output = open('output.odt', 'wb')
output.write(engine.render(template, image='writer.png'))
print("Template rendering finished! Check output.odt file.")