.. Nannou documentation master file, created by sphinx-quickstart on Sun Feb 27 12:45:58 2011. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Nannou's documentation ********************** Nannou is a templating engine designed for html (but not only) codogeneration of complex objects with arbitrary structure. It based by `pattern matching `_ concept and influenced by `refal `_ and `xslt `_ languages. Thus nannou forces better decomposition in templates and object model. In return certain complex cases may require additional hacks and decorations. .. toctree:: :maxdepth: 2 tutorial Quickstart ---------------- Data >>> data = {'foo': [{'bar':1, 'baz':2}, {'bar':None, 'baz':{'foo':'x x x'}}]} Template .. sourcecode:: html
<%foo%>
<|em><%bar%> <%baz%> Compiling >>> import nannou >>> f = nannou.compile(tmpl, {}) Running >>> print f(data) Produces .. sourcecode:: html
1 2
x x x
Installation ------------ Nannou avaible wia `PyPI `_ http://pypi.python.org/pypi/nannou/ Lastest version can be found in mercurial repository: https://bitbucket.org/nyufac/nannou/ After downloading go to source folder and type: .. sourcecode:: sh make build This build nannou package. After that you can type .. sourcecode:: sh python setup.py install or .. sourcecode:: sh pip install dist/nannou-x.x.x.tar.gz where x.x.x is current version. Configuration ------------- .. automodule:: nannou :members: