From: Roberto A. <ra...@ne...> - 2008-08-28 16:19:04
|
On Thursday 28 August 2008 13:05:40 Doug Hellmann wrote: > I'm trying to do determine if there is an easy way to convert an rst > file to a text file with reasonable formatting (indentation, wrapping, > etc.) and without the rst markup (no index markers or other > directives, etc.). We are starting to use rst for documentation at > work, and if we can convert to plain text easily we won't need to > duplicate the help text for our command line applications. We don't > want to just show the rst source, because of the extra markup. > > I've looked (via google and sourceforge.net's search) for topics like > "convert rst to plain text", but unfortunately most of the hits are > about how rst *is* plain text and there are an overwhelming number of > those. > > I don't see a writer in the standard distribution that looks like it > would strip the markup (I thought the null writer might, but it > doesn't look seem to). > > Am I missing something obvious? Is this a problem that has been > solved already? Can anyone help with pointers, either in the form of > code or other ways to search for what I need? Use rst2html and then links -dump? Looks pretty good to me here, and seems to be easy to automate. -- ("\''/").__..-''"`-. . Roberto Alsina `9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH) (_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar _..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia (l)-'' ((i).' ((!.' according to alexa.com (27/5/2007) Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. --Brian W. Kernighan |