textile preformatter
Mark Smith <mark-2N6weYfYsOhWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
For anyone interested in an easy markup alternative, Dean Allen's
Textile (http://www.textism.com/tools/textile/) has been ported to
Python. You can get it at http://diveintomark.org/projects/pytextile/.
The preformatter is straightforward:
import os
from pytextile import textile
from libs.preformatters.base import PreFormatterBase
class PreFormatter(PreFormatterBase):
def __init__(self, text = ''):
self.text = text
def parse(self):
return textile(os.linesep.join(self.text))
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en