Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

ludo http://asiatica.org/~ludo/

« Newer Snippets
Older Snippets »
1 total  XML / RSS feed 

Apply the 'anchor patch' to Trac

The 'anchor patch' adds support for a couple of very useful Trac macros:

* TocMacro http://trac-hacks.swapoff.org/wiki/TocMacro
* RefMacro http://trac-hacks.swapoff.org/wiki/RefMacro

To apply the patch without bothering the overworked TXD admnins, you can set up your own local copy of the Trac python package.

Assuming you have copied anchor.diff from

http://trac-hacks.swapoff.org/wiki/AnchorPatch

to your home directory, and that you are using bash and have a valid .bash_profile in your home (.profile will do too):

mkdir -p ~/lib/python2.4/site-packages
cp -R /usr/local/lib/python2.4/site-packages/trac ~/lib/python2.4/site-packages/
cd ~/lib/python2.4/site-packages
patch -p1 <~/anchor.diff
echo 'PYTHONPATH=$HOME/lib/python2.4/site-packages:$PYTHONPATH; export PYTHONPATH' >> ~/.bash_profile
python /usr/local/lib/python2.4/compileall.py ~/lib/python2.4/site-packages/trac


Now kill and restart tracd, and it should pick up the trac module in your home instead of the default.
« Newer Snippets
Older Snippets »
1 total  XML / RSS feed