With Mako you can automatically generate various types of text and steer the generation through Python code embedded in the DocOnce. DocOnce will detect if Mako commands are used and run the preprocessor prior to translating the DocOnce source to a specific format.
Mako provides a familiar, non-XML syntax which compiles into Python modules for maximum performance. Mako's syntax and API borrows from the best ideas of many others, including Django and Jinja2 templates, Cheetah, Myghty, and Genshi.
Mako is used by Reddit where it delivers over one billion page views per month (Ref). It is the default template language included with the Pylons and Pyramid web frameworks Nutshell. For more details, consult documentation.
You can download Mako from here and easily install it by using pip:
Code: Select all
pip install Mako