Base-Art

Phil's blog

en
May 2012
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

Doc publishing for the lazy Trac user

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/

by Philippe Normand on Thu Jul 27 23:55:50 2006 (Viewed: 7035 / 1 comments )
  |   RSS  |   RSS2  |   Atom  |   Source  |   Edit

#.   winjer on Fri Jul 28 14:35:51 2006

superb! I've nearly written this myself many times, but never got round to it. I want to hug you.

Comments not allowed anymore on this post