1200
Comment: Wanted to use reST for a blogging program, but...
|
1656
blogging pessimism uncalled for
|
Deletions are marked like this. | Additions are marked like this. |
Line 17: | Line 17: |
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: {{{ #!python html = docutils.core.publish_string( source=text, writer_name='html') html = html[html.find('<body>')+6:html.find('</body>')].strip() }}} -- IanBicking |
ReStructuredText is a complete rewrite of StructuredText by David Goodger.
More information:
[http://docutils.sourceforge.net/spec/rst/introduction.html An Introduction to ReStructuredText]
[http://docutils.sourceforge.net/docs/rst/quickstart.html A ReStructuredText Primer]
[http://docutils.sourceforge.net/spec/rst/reStructuredText.html ReStructuredText Markup Specification]
[http://www.ocf.berkeley.edu/~bac/rest_tutorial.html Brett Cannon's PyCon Tutorial]
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:
-- IanBicking