My favorites | Sign in
Project Home Wiki Issues Source
Project Information
Members
Featured
Wiki pages
Links

about

python-creole is a OpenSource (GPL) Python lib for converting markups. python-creole is pure python. No external libs needed.

Existing converters:

  • creole -> html
  • html -> creole markup
  • reSt -> html (for clean html code)
  • html -> reStructuredText markup (only a subset of reSt supported)
  • html -> textile markup (not completed yet)

links

GitHub http://github.com/jedie/python-creole
PyPi http://pypi.python.org/pypi/python-creole/
IRC #pylucid on freenode.net

donation

Flattr this

Send Bitcoins to 12QK6o7sGw7Dp3Fdfm2qKvyRqzuY2w5da9

about creole

Creole syntax looks like this:

Creole cheat sheet

more info: http://en.wikipedia.org/wiki/Creole_(markup)

example

Convert creole markup to html code:

>>> from creole import creole2html
>>> creole2html("This is **creole //markup//**")
u'<p>This is <strong>creole <i>markup</i></strong></p>\n'

Convert html code back into creole markup:

>>> from creole import html2creole
>>> html2creole(u'<p>This is <strong>creole <i>markup</i></strong></p>\n')
u'This is **creole //markup//**'

Convert html code into ReStructuredText markup (needs docutils)::

>>> from creole.rest2html.clean_writer import rest2html
>>> html2rest(u'<p>This is <strong>ReStructuredText</strong> <em>markup</em>!</p>')
u'This is **ReStructuredText** *markup*!'

Convert html code into textile markup

>>> from creole import html2textile
>>> html2textile(u'<p>This is <strong>textile <i>markup</i></strong>!</p>')
u'This is *textile __markup__*!'

See also: /trunk/demo.py

Download

Source distribution available at Python Package Index:

sourcecode

Fork me on GitHub

The sourcecode hosted on github:

  • use git: git clone git@github.com:jedie/python-creole.git
  • use svn: svn checkout http://svn.github.com/jedie/python-creole.git

github project page: http://github.com/jedie/python-creole

A git clone also exist here on google code.

install

You can easy install it with:

easy_install python-creole

ohloh

Powered by Google Project Hosting