`get_instance()` returns two values. Old code, instead of unpacking two
values in two variables, placed the tuple in a single variable
`pelican`.
Later in the same block when `pelican.run()` was called, it resulted in
error.
```
-> Modified: content, theme, settings. re-generating...
CRITICAL: ("'tuple' object has no attribute 'run'",)
CRITICAL: 'tuple' object has no attribute 'run'
Traceback (most recent call last):
File "/Users/talha/Repos/VirtualEnvs/pelican-dev/bin/pelican", line 8,
in <module>
load_entry_point('pelican==3.3', 'console_scripts', 'pelican')()
File
"/Users/talha/Repos/VirtualEnvs/pelican-dev/lib/python2.7/site-packages/pelican-3.3-py2.7.egg/pelican/__init__.py",
line 353, in main pelican.run()
```
Either the returned value should be unpacked properly or
`pelican[0].run` should be called.
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.
If DELETE_OUTPUT_DIRECTORY is set to True, all files and directories are
deleted from the output directory. There are, however, several reasons
one might want to retain certain files/directories and avoid their
deletion from the output directory. One such use case is version control
system data: a versioned output directory can facilitate deployment via
Heroku and/or allow the user to easily revert to a prior version of the
site without having to rely on regeneration via Pelican.
This change introduces the OUTPUT_RETENTION setting, a tuple of
filenames that will be preserved when the clean_output_dir function in
pelican.utils is run. Setting OUTPUT_RETENTION = (".hg", ".git") would,
for example, prevent the relevant VCS data from being deleted when the
output directory is cleaned.
If a setting exists in DEFAULT_CONFIG, assume it will be there
(instead of checking and/or providing a local default). The earlier
code was split between the two idioms, which was confusing.
Python generates certain exception messages (like IOError) in system
language, if locale is set. This ensures that the message is properly
converted to unicode in Python 2.
This is a combination of 13 commits:
1. New signal for registering custom generators
2. New plugin: pelican.plugins.sitemap
3. pelican.plugins.sitemap: more settings
4. pelican.plugins.sitemap: translations are indexed
5. pelican.plugins.sitemap: added documentation
6. pelican.plugins.sitemap: added XML DTD & W3C dates
7. pelican.plugins.sitemap: removed a <changefreq> bug
8. the `get_generators` can now return a tuple
9. pelican.plugins.sitemap: cleaned the code
10. pelican.plugin.sitemap: settings changes
11. sitemap plugin: improved configuration & documentation
12. sitemap plugin: :set spell
13. sitemap plugin: removed useless whitespaces