Hello Clint,
in fact, it is so easy to write something like that that I could not resist to
write one:
http://www.hosting4u.cz/jbar/rest/rest.html
Just a side note, we both mean rendering reST to HTML; you can render reST to
other formats such as PDF or plain text. reST is a markup... :-)
If you're interested, here's the source (using mod_python):
rest.py
-------
from docutils.core import publish_string
def index(req, content):
req.content_type = 'text/html; charset=UTF-8'
req.send_http_header()
return publish_string(source=content, writer_name='html')
apache conf fragment
--------------------
(be sure to put rest.py and rest.html in the directory (such
as /home/jbar/scratchpad/rest) and edit the path below... and don't forget to
load mod_python)
<Directory "/home/jbar/scratchpad/rest">
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
Alias /rest /home/jbar/scratchpad/rest
rest.html
---------
<html>
<head>
<title>reST renderer</title>
</head>
<body>
<h1>reST to HTML conversion</h1>
<form action="render.py" method="post">
<label>Type in some reST into the box below:</label>
<textarea name="content" rows="20" cols="80"></textarea>
<br /><br />
<input type="submit" value="Render" />
</form>
</body>
</html>
HTH,
Jiri
Post by Clint LaskowskiSeems there should be a 'try it now' link on the docutils or
ReStructured Text pages where a newbie could type in some ReST and have
it rendered. Is there such a page, site, etc.?
-- Clint