Revision 6 as of 2004-02-18 04:35:12

Clear message

ReStructuredText is a complete rewrite of StructuredText by David Goodger.

More information:

{i} MoinMoin contains an (incomplete) bridge to the docutils's parser, you can try this by using "#format rst" as the first line of a wiki page. See RestSample for an example. This of course only works when you use the current CVS version, and when docutils is installed.

Discussion

I really wanted to use ReStructuredText for a blogging program. It would take a string of ReStructuredText, and then turn that into an HTML fragment. However, reST seems extremely resistant to giving you anything but a full HTML document. It's probably possible to get a fragment, but it'd take longer to figure out how than to make my own miniature "structured text"-like language.

-- LionKimbro

Of course, it's very easy to take a full HTML document and extract the body. It may feel wrong, but it works, and works reliably. PyDS uses reST successfully for blogging (though I don't know the specifics of its integration). Here's a little recipe:

   1 html = docutils.core.publish_string(
   2            source=text,
   3            writer_name='html')
   4 html = html[html.find('<body>')+6:html.find('</body>')].strip()

-- IanBicking

Unable to edit the page? See the FrontPage for instructions.