Date Tags Python

At work i daily use Trac, it’s a great flexible wiki and issue tracking system. These days we’re editing some documentation files hosted on the subversion repository. Using the Wiki to display them for human eyes is the next step, but how to keep rendered and source versions in sync?

Let’s use Trac’s WikiMacro dead simple yet powerful framework. We currently use ReST as the documentation format, so it was quite easy to use docutils to convert ReST files to HTML fragments, cache them to filesystem and render them via the macro. Here is a simple use-case:

[[ReST(/trunk/docs/design.txt)]]

And no more copy/paste between svn and wiki. Using it is adopting it, go check it out in the PythonFR svn repository.

update 2006/08/01 the macro is now embedded in a Trac plugin, which eases deployement and updates. It also directly uses the ReST publisher used in Trac, this allows to use trac dedicated formatting. The plugin has a new location: http://svn.pythonfr.org/public/pythonfr/utils/trac/rest_macro/


Comments

comments powered by Disqus