{% extends "layout.html" %} {% set title = 'OOTemplate Overview' %} {% block body %}

OOtemplate: reports made easy by openoffice.org

ootemplate.png

oootemplateis a simple template system based on OpenOffice.org. It allows to use an odt document to produce any layout and uses python to render it. The following code shows how easy it is to use it to produce a pdf document.

import oootemplate as oo

tmpl = oo.Template('/tmp/mytemplate.odt', server='127.0.0.1', port=2002)
context = oo.Context({
    'user' : user,
    'date' : date(2008, 6,2),
    'currency' : 'Euro',
    'Table2' : (
         (book21, book22, ...),     
         (book31, book32, ...),
         )
    })

tmpl.render(context)
tmpl.save_as('/tmp/new_document.pdf')


Author

Ootemplate has been written by Sandro Dentella Simone Castellazzi

{% endblock %}