Genshi Templates for Venus
Earlier, I explored Genshi Filters for Venus, and compared them to XSLT.
Today, I implemented Genshi Templates. Lets compare them to htmltmpl.
Excerpt from genshi_fancy:
<h3 py:if="entry.new_feed"><a href="$entry.link" title="$entry.source.title">$entry.source.config.name</a></h3> <img py:if="entry.new_feed and entry.source.config.face" class="face" src="images/$entry.source.config.face" width="$entry.source.config.facewidth" height="$entry.source.config.faceheight" alt=""/>
Corresponding excerpt from classic_fancy:
<TMPL_IF new_channel> <h3><a href="<TMPL_VAR channel_link ESCAPE="HTML">" title="<TMPL_VAR channel_title_plain ESCAPE="HTML">"><TMPL_VAR channel_name></a></h3> <TMPL_IF channel_face> <img class="face" src="images/<TMPL_VAR channel_face ESCAPE="HTML">" width="<TMPL_VAR channel_facewidth ESCAPE="HTML">" height="<TMPL_VAR channel_faceheight ESCAPE="HTML">" alt=""> </TMPL_IF> </TMPL_IF>
Some of the differences are due to the variables passed into the templates. See the documentation for details.