1
0
Fork 0
forked from github/pelican
Commit graph

142 commits

Author SHA1 Message Date
Alexis Métaireau
2b87eb7af6 Add a caching mechnism 2013-09-25 23:35:36 +02:00
Justin Mayer
2c468f091a Prepare version 3.3.1.dev for next development cycle 2013-09-24 21:57:28 +02:00
Justin Mayer
b35ce43b7f Bump version 3.3.0 2013-09-24 21:57:07 +02:00
Axel Haustant
c61f6f402a Prepare for bumpr 2013-08-24 20:17:05 +02:00
Axel Haustant
d11b33030f Use .dev suffix for development versions 2013-08-21 06:18:43 +02:00
Talha Mansoor
a7152716e2 Receive the two values returned from get_instance()
`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.
2013-08-11 01:43:27 +05: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 Mahan
dfc3a7ce2f Move PDF generation to a plugin. Fixes #1009 2013-08-04 18:01:56 -07:00
Russ Webber
4977de8453 fix: clear directory before generation of context
fixes #927
2013-08-04 14:00:56 +08:00
Russ Webber
3445066b11 fix an exception not correctly reporting if the locale is not set 2013-07-18 09:44:46 +08:00
Justin Mayer
6f36b0a246 Keep certain files when cleaning output; fix #574
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.
2013-06-25 19:03:32 -07:00
Danilo Bargen
d8c9fb31d0 Better duck typing in isinstance check 2013-06-20 00:13:57 +02:00
W. Trevor King
0d1866b393 Pelican.run: Use keyword arguments when initializing generators
This makes it easier to add new arguments to Generator subclasses.
2013-06-16 12:15:26 -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
Alexis Métaireau
ead50cca62 some cleanup 2013-05-13 13:53:52 +10:00
Alexis Metaireau
bcfd574664 Merge pull request #804 from dowlingw/master
#803 - Include default configuration file if present
2013-05-12 20:50:31 -07:00
Deniz Turgut
084818b399 Handle critical exception logging correctly in localized systems
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.
2013-05-04 04:55:42 -04:00
Deniz Turgut
be8837963a ignore emacs lock files and exception handling for watchers 2013-04-22 20:50:11 -04:00
Justin Mayer
e55878fc2e Merge pull request #857 from avaris/feedback
add feedback to user and refactor 'autoreload' code
2013-04-20 07:57:56 -07:00
Deniz Turgut
5ccbbcc7d1 add feedback to user and refactor 'autoreload' code 2013-04-19 13:35:20 -04:00
Deniz Turgut
a07052ff86 force argparse output to be unicode in Py2 2013-04-18 15:03:43 -04:00
Deniz Turgut
a3e8a2d18d __import__ fails for unicode 'fromlist' in Py2.x 2013-04-14 17:03:19 -04:00
Deniz Turgut
c2924402ad Fix for issue #428: Use PLUGIN_PATH properly 2013-04-05 02:39:12 -04:00
Will Dowling
de69739774 Fixing help text 2013-03-26 02:42:11 +00:00
Will Dowling
0d43017704 Adding information to argparse help 2013-03-26 10:37:37 +08:00
Will Dowling
608e398386 Removing utils.file_exists and replacing with os.path.isfile 2013-03-25 10:45:43 +00:00
Will Dowling
b06fbd78cc Load a default-named configuration file if present 2013-03-25 10:39:22 +00:00
Alexis Metaireau
ff571967cf Merge pull request #790 from davidjb/raise-exceptions
Raise exceptions from the autoreload loop if debug is enabled
2013-03-22 00:34:10 -07:00
W. Trevor King
b59da89e80 Convert '.' and '..' to the less magical os.curdir and os.pardir
While I'm cleaning up path manipulation, I might as well make things
more semantic.
2013-03-21 12:44:44 -04:00
David Beitey
1ff16f248b Raise exceptions from the autoreload loop if debug is enabled 2013-03-21 15:52:42 +10:00
dave mankoff
44351aaf31 delete output directory properly 2013-03-03 22:14:05 -08:00
Alexis Métaireau
519dcdbcb3 Manual pass on sources for better standards. 2013-03-03 20:12:31 -08:00
Rıdvan Örsvuran
0288bf1f68 added IGNORE_FILES setting for autoreload 2013-01-23 01:02:46 +01:00
Dirk Makowski
71995d5e1b Port pelican to python 3.
Stays compatible with 2.x series, thanks to an unified codebase.
2013-01-11 03:20:09 +01:00
Alexis Métaireau
f92c0cb69d update the version scheme to support micro versions 2012-12-04 01:43:19 +01:00
Alexis Métaireau
be2a3f4030 bump version number 2012-12-04 01:27:16 +01:00
Bruno Binet
a0504aeabe add support for relative cross-site links 2012-12-01 21:32:02 +01:00
Bruno Binet
c74abe579b Don't rewrite URLs
Remove the code that was appending ../static in front of some URLs, and add a
way to do cross-content linking.
2012-12-01 21:30:50 +01:00
Simon
4cfb0cd24e Move Webassets in a plugin 2012-11-07 00:17:50 +01:00
Simon
d0f5875f66 remove the LessCSSGenerator and the related config option 2012-11-05 21:51:27 +01:00
Bruno Binet
e0e1b3eecf rename STATIC_PAGES to TEMPLATE_PAGES 2012-10-30 09:56:10 +01:00
Tarek Ziade
a91f1cab5d activate the static page generator only if the option is used
Conflicts:
	pelican/__init__.py
2012-10-30 09:56:10 +01:00
Tarek Ziade
7127676f71 added a static pages generator
Conflicts:
	pelican/__init__.py
	pelican/generators.py
	pelican/settings.py
2012-10-30 09:56:08 +01:00
Bruno Binet
0856b72c3c cosmetics
lines should be < 80 chars
2012-10-22 23:05:18 +02:00
jawher
a11726783e TRANSLATION_FEED is now split into TRANSLATION_FEED_ATOM and TRANSLATION_FEED_RSS to match the other feed configuration keys
Incidentally, Pelican can now generate RSS translation feeds.
2012-10-22 22:52:06 +02:00
Bruno Binet
4029f2ec82 refactoring so that command line options override settings
and Pelican class now accepts a single parameter ``settings``
2012-10-16 01:35:39 +02:00
Alexis Métaireau
17dc36aad6 merge upstream 2012-10-12 23:22:55 +02:00
tBunnyMan
ffc8ec7a5b Add sleep to no files exception to avoid CPU load 2012-10-12 23:01:50 +02:00
m-r-r
0073c64e21 Sitemap plugin & get_generators signal
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
2012-10-12 23:01:50 +02:00
Nico Di Rocco
519d664a40 Added a new signal finalized that is dispatched when pelican finishes.
This signal can then be used for post processing.
2012-10-12 23:01:50 +02:00