Kent's Korner
by Kent S Johnson

2007-06-27 18:42:46

Firedrop2 and reStructuredText

This entry is a little different than previous Kent's Korners. Instead of writing about the Python language and libraries, I'm writing about the tools I use to create these posts - Firedrop2 and reStructuredText.

Firedrop2

Firedrop2 is a desktop blogging application written in Python with wxPython. It is a client-side tool - blog entries are created, stored and rendered on your own computer. The finished blog pages are uploaded as static files to a web server. This has the benefit that the entire process and all the data is completely under your control.

Firedrop2 supports several source formats for blog entries including plain text, straight HTML, and four text markup languages that are easier to write than HTML while still allowing for rich formatting - reStructuredText, textile, sextile and markdown.

I first started using Firedrop2 for my blog when I grew tired of PyDS; it was far too complex and idiosyncratic for my simple needs. When I started writing Kent's Korner, it was very easy to continue to use Firedrop2 for these essays.

Firedrop2 provides several related capabilities. Taken together they make a simple and complete HTML publishing package:

  • simple text editing
  • storage and retrieval of blog entries in the file system
  • rendering reST or other markup to HTML
  • wrapping the rendered HTML with site templates
  • index page creation
  • FTP upload to a server

For more details, see the Firedrop2 web site.

reStructuredText

reStructuredText (reST) is a syntax for marking up plain text with formatting information and a parser that converts the marked up text to HTML and other formats. There are many such systems, all trying to strike a balance between ease of use and power. Some other examples are textile, sextile and markdown - all of which are also supported by Firedrop2 - and the various wiki markup systems such as Wikipedia's Wikitext. I don't claim that reST is necessarily the best of these, but it does work well and it is slowly gaining in popularity in the Python world. One feature that sets reST apart is that tools are available to convert reST to LaTeX and XML as well as HTML.

reST is part of the docutils project. It is the markup used to create PEPs and there is some possibility that the Python documentation will be converted from LaTeX to reST.

reST provides markup for many common needs such as italics, bold and monospaced text. It supports multiple levels of headers, several styles of footnotes and citations, hyperlinks, lists and pre-formatted text blocks (e.g. for code listings). The reST processor can be extended with custom directives for more flexibility.

For formatting examples, see the document Quick reStructuredText.

 
© Kent S Johnson Creative Commons License

Short, introductory essays about Python.

kentsjohnson.com

Kent's Korner home

Weblog

Other Essays