Skip to main content

Quick an dirty tool to transform text in Trac Wiki formatting to Restructured Text

Project description


I use trac2rst to help me in the task to pass documentacion from trac to sphinx. I usally copy the trac wiki page to a temporaly file, run the script, copy the output to the new rest file and do manual changes.


The idea is use the tool to do the more tedious work (I mean transforming lists, links and inliners). You must review and fix the result later.

It only processes:
  • Headers (sections at 4 levels)

  • Lists (bullets and numbered)

  • Trac links.

  • A subject of trac and rest inliners

It does NOT support (a lot):
  • Trac macros

  • Trac processors

  • Links between wiki pages

  • Rest definition lists, etc

  • Preformatting

  • Images

  • Tables

  • Footnotes

  • Anchors

  • Citations

  • Comments

  • A lot more …

Usage example

Type trac2rst –help

You can view a simple wiki transfomation (used for manual test):

$ bin/trac2rst -i src/trac2rst/tests/wikitext.txt -u  -o /tmp/test.rst && rst2html /tmp/test.rst /tmp/test.html && firefox /tmp/test.html


This is a quick and dirty tool. It does not use reST or wiki processor. The work is done using regular expressions.


trac2rst is offered under the MIT license.


trac2rst is made available by Yaco Sistemas



0.2 (2011-12-19)

  • pep8 compliant

  • Global variables removed

  • Set a TODO comment por preformated text

0.1 (2011-12-19)

  • First Release

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trac2rst-0.2.tar.gz (9.3 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page