pws21 / python-textile

A Python port of Textile, A humane web text generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python-textile

python-textile is a Python port of Textile, Dean Allen’s humane web text generator.

Installation

Install the ‘textile’ folder on your python path, or pip install textile

Usage


>>> import textile
>>> s = """
... _This_ is a *test.*
...
... * One
... * Two
... * Three
...
... Link to "Slashdot":http://slashdot.org/
... """
>>> html = textile.textile(s)
>>> print html
	<p><em>This</em> is a <strong>test.</strong></p>

	<ul>
		<li>One</li>
		<li>Two</li>
		<li>Three</li>
	</ul>

	<p>Link to <a href="http://slashdot.org/">Slashdot</a></p>
>>>

Notes:

  • Active development supports Python 2.6 or later (including Python 3.2+).

About

A Python port of Textile, A humane web text generator

License:Other


Languages

Language:Python 100.0%