[Grok-dev] Re: Using pygments in rest with rst2html
vincent.fretin at gmail.com
Sun Aug 3 13:00:25 EDT 2008
On Sun, Aug 3, 2008 at 6:18 PM, Michael Haubenwallner <michael at d2m.at> wrote:
> Vincent Fretin wrote:
>> How can I use code-block or sourcecode directive in rest and make the
>> rst2html.py mydoc.rst > mydoc.html
>> I easy_install-ed docutils and Pygments. But I don't understand how I
>> import the special directives. I didn't find a good answer on the web.
>> Somebody know how to do it?
> The directives are included in
Thanks, I easy_install-ed ulif.rest
I edited bin/rst2html.py to include the three imports:
from ulif.rest import directives_plain
from ulif.rest import roles_plain
from ulif.rest import pygments_directive # for syntax-highlighting support
and I tested it:
$ rst2html.py mydoc.rst > mydoc.html
and it gave me :
line 110, in ?
ImportError: No module named roman
Indeed roman.py module is nowhere, not in the virtualenv's
site-packages, not in site-packages global directory.
Then I easy-installed docutils==0.5 and modified again bin/rst2html.py
and it works. docutils 0.5 have the roman.py module.
$ find lib/python2.4/site-packages/ -name roman.py
The docutils dependency version should be updated to 0.5, and a new
release of ulif.rest should be made, no?
More information about the Grok-dev