getpelican/pelican — pull request #510 by nrocco (2012-09-10 21:35:36+00:00)
Title: New source file .text generator

I created a new generator that generates .text files in the output path from articles and pages in the source directory.

For example: assume that the file `SOURCE_PATH/pelican-howto.md` exists and that pelican generates the html file OUTPUT_PATH/2012/08/28/a-pelican-howto.html.

Then this generator creates a file `OUTPUT_PATH/2012/08/28/a-pelican-howto.text` containing the contents of the source file.

The generator is enabled/disabled in a similar fashion as the pdf generator using the setting: SOURCES_GENERATOR.

The pull request is not entirely ready yet as I need to include tests as well.
Any suggestions on how to optimize/pythonize my code?

Or do you thing this generator is useless?
I was inspired by a similar functionality at DaringFireball blog where you can append .text to every url to see the Markdown version of blog articles.