C
Chris Withers
Hi All,
I'm proud to announce that after almost a year's development, the first
public release of Twiddler is available!
Twiddler is a simple but flexible templating system for dynamically
generating textual output.
The key features are:
- No need to learn a templating language.
- As simple as possible while still catering for all possible templating
operations.
- Configurable input parsing so source can be html, xml, plain text or
anything you write an input parser for.
- Configurable output rendering so output can be rendered to a unicode
string, an email, or anything you write an output renderer for.
You can find out more and download from here:
http://www.simplistix.co.uk/software/python/twiddler
If you wish to ask questions, pass judgement or get help, please do so
in the following mailing list:
http://groups.google.com/group/twiddler
This is the first public release, so I'm looking for help with the
following:
- Finding anything that should be possible in a templating system but
isn't with Twiddler
- Packaging it up for easier distribution. I know nothing about eggs,
distutils, etc, and so could do with help to package Twiddler so that
it can be more easily installed.
Finally, here's a couple of quick examples:
.... <div id="title">A title</div>
.... <select name="items">
.... <option id="item">An item</option>
.... </select>
<body>
<div id="title">My title</div>
<select name="items">
<option id="item" value="1">Item 1</option>
<option id="item" value="2">Item 2</option>
<option id="item" value="3">Item 3</option>
</select>
To: John Smith
Item 1
Item 2
Item 3
Thanks for reading this far, I hope you enjoy it!
cheers,
Chris
I'm proud to announce that after almost a year's development, the first
public release of Twiddler is available!
Twiddler is a simple but flexible templating system for dynamically
generating textual output.
The key features are:
- No need to learn a templating language.
- As simple as possible while still catering for all possible templating
operations.
- Configurable input parsing so source can be html, xml, plain text or
anything you write an input parser for.
- Configurable output rendering so output can be rendered to a unicode
string, an email, or anything you write an output renderer for.
You can find out more and download from here:
http://www.simplistix.co.uk/software/python/twiddler
If you wish to ask questions, pass judgement or get help, please do so
in the following mailing list:
http://groups.google.com/group/twiddler
This is the first public release, so I'm looking for help with the
following:
- Finding anything that should be possible in a templating system but
isn't with Twiddler
- Packaging it up for easier distribution. I know nothing about eggs,
distutils, etc, and so could do with help to package Twiddler so that
it can be more easily installed.
Finally, here's a couple of quick examples:
.... <div id="title">A title</div>
.... <select name="items">
.... <option id="item">An item</option>
.... </select>
.... r.repeat('Item '+str(i),value=i,name=False).... said:>>> t['title'].replace('My title')
>>> r = t['item'].repeater()
>>> for i in range(1,4):
<body>
<div id="title">My title</div>
<select name="items">
<option id="item" value="1">Item 1</option>
<option id="item" value="2">Item 2</option>
<option id="item" value="3">Item 3</option>
</select>
.... r.repeat('Item '+str(i),value=i,name=False)>>> from twiddler.input.plaintext import PlainText
>>> t = Twiddler('''To: $to
>>> t['to'].replace('John Smith')
>>> r = t['item'].repeater()
>>> for i in range(1,4):
To: John Smith
Item 1
Item 2
Item 3
Thanks for reading this far, I hope you enjoy it!
cheers,
Chris