getpelican/pelican — pull request #1011 by saimn (2013-08-04 18:33:50+00:00)
Title: Refactor readers and remove MARKUP

Add a `Readers` class which contains a dict of file extensions / `Reader`
instances. This dict can be overwritten with a `READERS` settings, for instance
to avoid processing *.html files:

READERS = {'html': None}

Or to add a custom reader for the `foo` extension:

READERS = {'foo': FooReader}

This dict is no storing the Reader classes as it was done before with
`EXTENSIONS`. It stores the instances of the Reader classes to avoid instancing
for each file reading.

Timing with @justmay's test set, before:
> Done: Processed 1404 articles and 8 pages in 28.88 seconds.

After:
> Done: Processed 1404 articles and 8 pages in 18.24 seconds.