From: David G. <go...@py...> - 2013-10-25 22:32:34
|
On 25 October 2013 14:37, Peter Funk <pf...@ar...> wrote: > Hallo Guenter, > > Guenter Milde schrieb am Freitag, den 25.10.2013 um 13:14: >> On 2013-10-25, Christian Weiske wrote: >> > Hi, >> >> >> > Is there docutils in-built support for generating rst from a rst file? >> > If not, is that planned? >> >> It is on the radar for a long time, but we are nowhere near to a "native" >> rst writer. > ... > > Would you or David care to explain, why it seems to > be so damn hard to implement something like this? There are some issues (e.g. the loss of information when directives are interpreted and generate generic nodes), but otherwise I don't think it's so hard. It's just a lot of detail work. Personally, it's something I've never needed, therefore I've never implemented it. This comes up from time to time, but (for whatever reason) the people who ask for it tend not to be willing to implement a (native) solution. I sense hostility in your message. Why? > For example: In the sandbox there is a rst2wiki written > by Joshua Graff. I admit that I've never used it and > didn't look into his code. But this writer is something > like 1150 lines of Python code. The manpage-writer in > docutils has a similar size. So does rst2beamer. > > Compare this to your latex2e/__init__.py which > was ---of course--- a lot of more work. > > What do you think? About what exactly? What's your point? > How much harder/easier would it be to implement > a writer which outputs rst looking similar to the > original parsed rst input document? > > Could you give an estimate on this task? No idea, sorry. I imagine that it would depend on *how* similar to the input you want the output. The more similar, the more work. -- David Goodger <http://python.net/~goodger> |