I built a nice html templater!

Derick van Niekerk derickvn at gmail.com
Tue Sep 30 03:16:23 EDT 2008


Ok - so it's not really an awesome achievement and only handles basic
templating needs (no loops and other programming constructs) but maybe
someone will find it useful.

It replaces any xml block where the id attribute is specified with
contents provided - a description is provided in the comments.

http://pastebin.com/m76f57ae2

My knowledge of python is limited and I would like someone to help me
with wrapping a command line interface around this function. I need
switches to specify input file, output file, key/value pairs for
variable substitution and key/value pairs for substituting blocks with
file contents (there is some clarification in the comments)

Any help would be appreciated.

Of course - feel free to use the code as you wish when you wish if you
wish :)

-d-



More information about the Python-list mailing list