[ANN] htmltmpl and easydoc

Tomas Styblo tripie at cpan.org
Sun Sep 2 21:16:42 EDT 2001


htmltmpl is a templating engine for separation of code and HTML,
targeted mainly at web applications. It's similar and compatible with
HTML::Template, which is an templating engine that is very popular in
Perl world.

easydoc is an example application similar to Javadoc using htmltmpl to
generate XHTML-Strict compliant documentation from docstrings embedded
in Python source files.

Webpage of the project is at: http://htmltmpl.sourceforge.net/

Example output of easydoc (API documentation of htmltmpl itself) is
available at: http://htmltmpl.sourceforge.net/python-api.html

This is first public announcement. More detailed information follows.

----

The purpose of the templating engine is to provide web application
developers, who need to separate program code and design (HTML code)
of their web application projects, with a templating tool that can be
easily used by cooperating webdesigners who have no programming
skills.

Templating language provided by the engine is inspired by Perl
templating module HTML::Template. Templates created for HTML::Template
can be used with this engine.

The engine is currently available for Python. Java version is coming
soon. The Python package includes easydoc, a module which uses the
templating engine to generate HTML documentation from docstrings
embedded in source files of Python modules.

The primary goal of the templating engine is to keep things simple for
a webdesigner who creates the templates. Therefore, neither Python nor
Java code can be used in the templates. Instead, the templating engine
provides its own simple templating language that supports basic
programming operations like for example loops, conditionals and
substitution of variables. These operations are controlled from within
the templates by statements that look like HTML tags and integrate
nicely with regular HTML code.

The secondary goal is good performance. High speed template processing
is necessary when the engine is used by web applications.

I am aware that other templating solutions for Python and Java exist.
But none of them is similar to HTML::Template. I love its enforcement
of strict separation of code and HTML and the style and syntax of its
template language. I find it much more cleaner and maintainable than
the other solutions. Also, I need to move some projects from Perl to
Python and Java and I want to reuse my old HTML::Template templates.
These are the reasons why I created the templating engine.

----
Tomas Styblo, tripie at cpan.org
"too cynic for love, too ugly for sex"



More information about the Python-list mailing list