Related Entries

India PyCon 2009
Quick wallpaper changer
Load testing with Grinder
Adding namespace to XML
Opera RSS to OPML

« Vim outliner
» Hat problems

Using Leo with reST

Follow up on the older entry; things have changed with Leo 4.2 final.

For background infromation for this post, see my original post in 2003. I had to spend some time to get reST going with Leo 4.2. Now there are two plugins for reST., viz., old plugin and a new plugin called rst2 for getting reST formatted documentation for source code.

Here’s how you can use old reST plugin to keep your documentation work easy and organized.

  1. Install Python, Leo and docutils.
  2. Start Leo
  3. From Help menu, choose Open LeoConfig.leo.
  4. Go to General configuration options, especially read-only mode node and then to plugins options. Change use_plugins value to 1.
  5. Now do an Help - Apply Settings and close this file.
  6. Browse and open LeoPlugins.leo from plugins directory under your Leo installation directory.
  7. Find New kinds of nodes node and uncomment rst.py.
  8. Save the file.

That’s all. Next time you start Leo, the plugin will be enabled. For pure text reST documentation, note that the node type has changed from @rst to @text. @rst is now reserved for rst2 plugin.

I got a followup e-mail from Hal Wine.

fwiw, a while back I had the same issue with 4.2-final, and solved it a different way, by letting rst2.py work on "pure text".

See the patch 1066444 for leo -- no idea if it’ll be in 4.3.

fwiw 2, I just decided to implement the leo '@ignore' keyword, to "prune" portions of the tree from reST handling. That allows me to keep draft, work notes, etc with each node yet only output the high level stuff.

Glad to see someone else using Leo for reST!