Search code examples
pythongoogle-app-enginerestructuredtext

single py file for convert rst to html


I have a blog written in reStructuredText which I currently have to manually convert to HTML when I make a new post.

I'm writing a new blog system using Google App Engine and need a simple way of converting rst to HTML.

I don't want to use docutils because it is too big and complex. Is there a simpler (ideally single python file) way I can do this?


Solution

  • Have a look at the instructions for hacking docutils. You don't need the whole docutils to produce a html from rst, but you do need a reader, parser, transformer and writer. With some effort you could combine all of these to a single file from the existing docutils files.