[bzrweb PATCH] render reStructuredText
Lalo Martins
lalo at laranja.org
Sat May 21 11:43:03 BST 2005
- This patch adds a new bzrweb command, "gethtml", which is like "get"
but will try to pipe things trough reStructuredText. Turns out rst is a
popular format for python hackers to write stuff, and it's pretty cheap
to parse; this makes bzrweb much more useful in these cases ;-)
- If you have foo.txt on your tree, this patch adds a [html] link next
to it, leading to the gethtml command.
- The gethtml command has a special exception for files ending in
'.css'. This is a dirty hack, granted, but you can exploit it by
putting a file named 'bzrweb-rst.css' in the same directory as your rst
stuff, which will be linked from the docutils-generated html. If you
have docs all over the place and don't like the idea of having one css
file in each dir, all with the same content, then learn about @include ;-)
You can see it in action at
http://bazaar.laranja.org/index.py/log/yi-meiyou/head (the "FAQ" link on
the top goes to a document rendered via gethtml, and you'll see the
[html] links by clicking "view export", then "docs").
I'm uncertain if there should be a [html] link on txt files in the log too.
best,
Lalo Martins
--
It doesn't bother me that people say things like
"you'll never get anywhere with this attitude".
In a few decades, it will make a good paragraph
in my biography. You know, for a laugh.
--
http://www.laranja.org/ mailto:lalo at laranja.org
pgp key: http://www.laranja.org/pessoal/pgp
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rst2html.diff
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20050521/1a6e9032/attachment.diff
More information about the bazaar
mailing list