Differences between revisions 6 and 7
Revision 6 as of 2009-02-08 02:10:45
Size: 1153
Editor: 66-188-121-120
Comment: point to the proper pytextile download
Revision 7 as of 2010-02-05 10:01:07
Size: 4
Editor: surfers
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= PyTextile =

[[http://pypi.python.org/pypi/textile|PyTextile]] is a ''very'' easy to use text-to-HTML converter.

You can see [[http://www.textism.com/tools/textile/|a demonstration of Textile,]]
which can convert ''this:''

{{{
_This_ is a *test.*

* One
* Two
* Three

Link to "Slashdot":http://slashdot.org/
}}}

to ''this:''

{{{
        <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>
}}}

== Using PyTextile ==

First, [[http://pypi.python.org/pypi/textile|download the latest PyTextile.]]

Untar it, and enter the {{{textile}}} directory. Start a python interpreter.

Type:

{{{
#!python
import textile

s = """
_This_ is a *test.*

* One
* Two
* Three

Link to "Slashdot":http://slashdot.org/
"""

html = textile.textile( s )

print html
}}}

You'll see beautiful HTML on the other side, ready for inclusion in a web page. :)

== See Also: ==

ReStructuredText is another text-to-HTML converter.

= Discussion =

(none yet!)
\xe7

\xe7

PyTextile (last edited 2015-01-10 12:19:42 by WolfgangMaier)

Unable to edit the page? See the FrontPage for instructions.