1
0
Fork 0
forked from github/pelican
Commit graph

24 commits

Author SHA1 Message Date
Florian Jacob
4b2fcb09a4 Added a new ''modified:' metadata tag to be able to specify the
publication time and date and the last modified time and date
independently.

This makes it possible to access the last updated date with {{ article.locale_modified }} in templates.
Additionally, an already delivered feed entry can be corrected by changing the modified date and time, as it is used for atom:update
/ rss pubDate field now.
2013-11-10 00:14:55 +01:00
Mark Lee
35375b19ff Log a warning when the HTML reader encounters a nonconformant meta tag
Instead of throwing an exception and skipping the HTML file, log a
warning with a message which makes it more obvious as to what happened.
2013-11-08 14:37:07 -08:00
Simon Conseil
a49b744e95 Fix tests with latest versions of smartypants.
smartypants is now py3 compatible but the default settings for double quotes has
been changed (http://pythonhosted.org/smartypants/changes.html).

This commit:
- update the typogrify test (change quotes, and add more test casesi: caps word,
  ellipsis)
- install typogrify on travis
- uses upstream version of smartypants in tox instead of dmdm's fork for py3
2013-09-26 22:47:55 +02:00
Alexis Métaireau
aae56fee39 exception.message was removed in py 3.X 2013-08-17 01:12:39 +02:00
Alexis Métaireau
73b37989f7 update the readers tests 2013-08-17 01:02:07 +02:00
Alexis Metaireau
2be674c909 Merge pull request #903 from dominiqueplante/readers.read_file-throwsexception
Add unit test for the case for handing unhandled extension
2013-08-16 15:34:49 -07:00
Simon Conseil
4bc4b1500c 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.
2013-08-06 23:42:41 +02:00
Kyle Machulis
39dd4a0255 Changed meta tag "contents" attribute to "content", to conform to HTML spec. Fixes #918 2013-06-16 10:56:50 -07:00
W. Trevor King
06121eda76 test_readers: Update to new readers.read_file 2013-06-12 15:02:31 -04:00
W. Trevor King
8ff34e6c5d Replace settings.get(key) with settings[key] for default settings
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.
2013-06-02 14:24:27 -04:00
W. Trevor King
c8e7d95b34 tests.support: Use kwargs overrides in get_settings()
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.
2013-06-02 14:24:27 -04:00
W. Trevor King
c6de4430a0 tests/test_readers.py: Remove redundant 'expected' check in AdReaderTest
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.
2013-06-02 09:58:27 -07:00
Dominique Plante
7a3bc410d0 Add test for the case where we try to read a file with an unhandled extension 2013-05-23 21:53:46 -07:00
Justin Mayer
71150430a9 Merge pull request #885 from avaris/markdown-summary-footnote
Markdown summary should not include content footnote
2013-05-13 15:36:39 -07:00
Deniz Turgut
75f214103e Markdown summary should not include content footnote
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.
2013-05-10 03:50:33 -04:00
Simon Conseil
5ffadd2283 Add DOCUTILS_SETTINGS to allow to customize the docutils Publisher. 2013-04-23 12:28:30 +02:00
Emily Strickland
08f27e0134 Accept mdown file extension for Markdown files.
This extension is sometimes used for Markdown files and is the default
for a few editors, such as Sublime Text.
2013-04-17 21:14:52 -07:00
Deniz Turgut
bc4bd773a0 remove unittest2 and fix various warnings in py3 2013-04-13 16:36:05 -04:00
Deniz Turgut
0548b62441 fix for issue #761: handle unicode correctly in summary for Markdown 2013-04-03 19:38:42 -04:00
Colin Dunklau
edbac49f2b Nitpicking - tempdir naming, also backslashes are bad
Tempdirs should have useful prefixes to aid in collecting information
    about failed tests.
Implicit concatenation is better than backslash line continuation.
2013-03-26 11:51:33 -05:00
Alexis Métaireau
5aeca4826c Use comments in tests, not docstrings. 2013-03-10 22:42:46 -07:00
Alexis Métaireau
547f8d2e83 Move the tests into pelican. Fix #500 2013-03-06 00:41:27 -08:00
Mario Rodas
3cd84ab396 moving tests dir 2011-07-02 14:41:39 -05:00
Mikhail Korobov
6cd425e408 Basic test for the new rst reader. Locale is also converted to fr_FR.utf-8 (I wasn't able to run tests without this) 2011-05-11 09:42:37 +06:00