A Python port of Textile, A humane web text generator
Python
Pull request Compare This branch is 4 commits ahead of sebix:master.
Latest commit f2a9408 Mar 16, 2017 @ikirudennis ikirudennis merge branch release/2.3.7
Closes #39.

README.textile

python-textile

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

Installation

pip install textile

Optional dependencies include:

  • PIL/Pillow (for checking images size)
  • regex (for faster unicode-aware string matching).

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+).