What is it? A program that takes a docutils document tree ( parsed from a R=
document or programatically generated) then dumps as close as I can guess t=
reasonable RST back.
This lets Restructured Text be a saveable data format, which is nice.
It's not done as a docutils writer. Sorry, I couldn't make that work.
What works? Most of it.
What doesn't? A dozen directives, custom interpreted text roles, and=20
Yes, all of those are important. But the rest seems to work ok!
Look: a 804 line RST document containing almost every feature of the langua=
and the only difference in the generated HTML output between the original a=
rst2rst's is an invisible difference in continuation lines in line blocks. =
[ralsina@... wp]$ python rst2rst.py t1.txt > t2.txt
[ralsina@... wp]$ /usr/bin/rst2html.py t1.txt=20
t1.html ; /usr/bin/rst2html.py t2.txt t2.html
[ralsina@... wp]$ diff t1.html t2.html
< <div class=3D"line">But I'm expecting a postal order and I can pay you =
< as soon as it comes.</div>
> <div class=3D"line">But I'm expecting a postal order and I can pay you=
> <div class=3D"line">as soon as it comes.</div>
[ralsina@... wp]$ wc -l t1.txt
You can get rst2rst.py_ and the testfile_.
=2E. _testfile: http://lateral.blogsite.org/static/rst2rst/t1.txt
=2E. _rst2rst.py: http://lateral.blogsite.org/static/rst2rst/rst2rst.py
Anyone knows of a real docutils test suite I could borrow?
=A0("\''/").__..-''"`-. . =A0 =A0 =A0 =A0 Roberto Alsina
=A0`9_ 9 =A0) =A0 `-. ( =A0 =A0).`-._.`) =A0ralsina@...
=A0(_Y_.)' ._ =A0 ) `._`. =A0" -.-' =A0 KDE Developer (MFCH)
=A0 _..`-'_..-_/ /-'_.'
(l)-'' ((i).' ((!.' =A0 Buenos Aires - Argentina
=46eynman's problem solving algorithm: write down the problem->
think very hard -> write down the answer.