if it is a onetime conversion, you could use the roles as described
and make a conversion tool.

wikilinks would mean, that any word has to be tested for camelcase and if so made a href ?

On 27 March 2014 20:58, Dmitry S. Makovey <dmitry@athabascau.ca> wrote:
Hash: SHA1

On 03/27/2014 03:34 AM, elena.valhalla@gmail.com wrote:
> On 2014-03-26 at 19:40:19 -0600, Dmitry S. Makovey wrote:
>> So far my google searches failed to come up with clean
>> implementation of RST [pre/post] processing allowing me to add
>> support for Wiki-like links. The stuff I found normally
>> post-processes resuting HTML which is neither clean no kosher if
>> you ask me :) Which brings me here.
> I've added something similar in one of my WIP by creating a custom
>  role of the form::
> :wi:`Title|url`
> which works as a wiki-like link but is easier to manage using
> standard docutils stuff than the usual ``[Title|url]`` of most
> wikies.
> The implementation is proof of concept with no error checking etc.
>  (and it is part of a mostly abandoned project), but here you can
> see how I've done it: in rest.py_ I define a role function and
> register it as a role and then simply run publish_file.
> .. _rest.py:
> http://git.home.trueelena.org/gitweb/?p=software/wi.git;a=blob;f=wi/rest.py
thanks. I was contemplating "roles" but my usecase is where I have a
large pre-existing library of .rst files with WikiLinks in them that I
would like to process. Doing "simple" regular expressions I already
stepped on quite a few edge cases, since I was trying to [re]parse the
document myself instead of relying on docutils' capabilities. That is
why I'm looking to hook into docutils machinery just prior to final
rendering and tweaking some nodes (actually their text). Assuming it's
similar to DOM it should be easy to do.
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/


    This communication is intended for the use of the recipient to whom it
    is addressed, and may contain confidential, personal, and or privileged
    information. Please contact us immediately if you are not the intended
    recipient of this communication, and do not copy, distribute, or take
    action relying on it. Any communications received in error, or
    subsequent reply, should be deleted or destroyed.

Docutils-develop mailing list

Please use "Reply All" to reply to the list.