python-textile
python-textile copied to clipboard
A Python port of Textile, A humane web text generator
!https://travis-ci.org/textile/python-textile.svg!:https://travis-ci.org/textile/python-textile !https://coveralls.io/repos/github/textile/python-textile/badge.svg!:https://coveralls.io/github/textile/python-textile?branch=master !https://codecov.io/github/textile/python-textile/coverage.svg!:https://codecov.io/github/textile/python-textile !https://img.shields.io/pypi/pyversions/textile! !https://img.shields.io/pypi/wheel/textile!
h1. python-textile
python-textile is a Python port of "Textile":http://txstyle.org/, Dean Allen's humane web text generator.
h2. Installation
@pip install textile@
Dependencies:
- "html5lib":https://pypi.org/project/html5lib/
- "regex":https://pypi.org/project/regex/ (The regex package causes problems with PyPy, and is not installed as a dependency in such environments. If you are upgrading a textile install on PyPy which had regex previously included, you may need to uninstall it.)
Optional dependencies include:
- "PIL/Pillow":http://python-pillow.github.io/ (for checking image sizes). If needed, install via @pip install 'textile[imagesize]'@
h2. Usage
bc.. import textile
s = """ ... This is a test. ... ... * One ... * Two ... * Three ... ... Link to "Slashdot":http://slashdot.org/ ... """ html = textile.textile(s) print html
This is a test.
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>
<p>Link to <a href="http://slashdot.org/">Slashdot</a></p>
h3. Notes:
- Active development supports Python 3.5 or later.