Support the forms listed by the W3C [1]. I also removed the
'%Y-%d-%m' form, which can be confused with the '%Y-%m-%d' ISO form.
The new ISO forms can use 'Z' to designate UTC or '[+-]HHMM' to
specify offsets from UTC. Other time zone designators are not
supported.
The '%z' directive has only been supported since Python 3.2 [2], so if
you're running Pelican on Python 2.7, you're stuck with 'Z' for UTC.
Conveniently, we get ValueErrors for both invalid directives and
data/format missmatches, so we don't need special handling for the 2.7
case inside get_date().
[1]: http://www.w3.org/TR/NOTE-datetime
[2]: http://bugs.python.org/issue6641
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.
This avoids harcoding test-specific overrides, and makes it easy to
setup a settings dictionary based on DEFAULT_CONFIG for testing.
Because you can trust Pelican to use settings based on DEFAULT_CONFIG,
you are free to go about using:
settings[my_key]
instead of:
settings.get(my_key, some_fallback)
or:
if my_key in settings:
...
if you know that `my_key` is in DEFAULT_CONFIG.
Setting migration is something that will happen for multiple settings,
and the more we can standardize the reporting procedure, the easier it
will be to add new warnings.
This dictionary is accessed by plugins (like `summary`) which add new
settings, so it should be public (i.e. no prefixed underscore).
The changed name length would have led to a re-indenting of the
default contents anyway, so I shifted them all to four spaces.
AdReaderTest.test_article_with_asc_extension() has had duplicate
checks on the expected metadata since it was created by 49f481e3 (Add
asciidoc reader support, 2013-10-28). This commit removes the
duplicate entry.
+ This make it easier to use tox with py3: no need to checkout manually
typogrify and smartypants repos and use tox's distshare.
+ Remove feedgenerator as it is already a dependy for pelican.
Markdown instance carries state for subsequent uses. Content
and summary parsing is done with the same instance. Since
footnotes are processed with an extension and stored as state,
content footnote is duplicated for summary.
This PR adds a ``.reset()`` call before summary parsing to clear
the state. It also adds a test case with footnotes.
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.
More precisely, group tags or categories without considering the case.
This fixes the bug where two categories with just the case as difference were
considered as distinct, but generate the same file: one overwriting the other.
Thanks to @Avaris for helping with the tests.