From: Kent T. <kt...@gm...> - 2009-04-09 16:00:29
|
On Thu, Apr 9, 2009 at 5:58 AM, Roberto Alsina <ra...@ne...> wrote: > Stefan Rank writes: > >> on 2009-04-08 17:22 Kent Tenney said the following: >>> >>> Howdy, >>> >>> I am interested in the capability to read a rst file into >>> a doctree, write it back out, char-for-char. >> >> Just in case you did not know: >> I started working on a "lossless-rst-writer" quite some time ago, but got >> distracted. Can't relate to `getting distracted` :-] The responses provide lots of great code to study, I'm pleased that others are interested in round-tripping. I'm enjoying spending time with docutils code, hopefully this effort can lead to acceptable patches which will make writing out rst more fun. Thanks, Kent >> You can find it as a branch in the repository (might need some merging of >> trunk changes):: >> >> http://svn.berlios.de/viewcvs/docutils/branches/lossless-rst-writer/ >> >> It's not fully functional yet, but there is a test setup that might help. >> As there is quite some information missing in the current doctree, my plan >> was to get a decent lossy writer using the current doctree first and then >> add a lossless-parser that annotates the doctree with the necessary info. >> (of course adding this to the standard parser is fine with me :-) ) > > I also had an attempt (that AFAIK pretty much works) at > http://lateral.netmanagers.com.ar/static/rst2rst/rst2rst.py > |