1
0
Fork 0
forked from github/pelican
Commit graph

58 commits

Author SHA1 Message Date
dave mankoff
bc2bc7a330 git merge upstream/master 2013-01-28 21:41:42 -05:00
Rıdvan Örsvuran
0288bf1f68 added IGNORE_FILES setting for autoreload 2013-01-23 01:02:46 +01:00
Bruno Binet
6233f5a409 Merge pull request #667 from wking/page-path
Consolidate Path.filename and and StaticContent.filepath as `source_path`.
2013-01-18 07:30:03 -08:00
W. Trevor King
ec50e18a3e utils: Add deprecated_attribute decorator 2013-01-18 08:48:21 -05:00
W. Trevor King
c3c3037a1d utils: Teach mkdir_p to fail if the existing target isn't a directory
Existing symlinks to directories will still pass, because isdir()
follows symbolic links.
2013-01-18 08:32:55 -05:00
W. Trevor King
004adfa5cc content: Convert Path.filename to .source_path
Making everything consistent is a bit awkward, since this is a
commonly used attribute, but I've done my best.

Reasons for not consolidating on `filename`:

* It is often used for the "basename" (last component in the path).
  Using `source_path` makes it clear that this attribute can contain
  multiple components.

Reasons for not consolidating on `filepath`:

* It is barely used in the Pelican source, and therefore easy to
  change.
* `path` is more Pythonic.  The only place `filepath` ever show up in
  the documentation for `os`, `os.path`, and `shutil` is in the
  `os.path.relpath` documentation [1].

Reasons for not consolidating on `path`:

* The Page elements have both a source (this attribute) and a
  destination (.save_as).  To avoid confusion for developers not aware
  of this, make it painfully obvious that this attribute is for the
  source.  Explicit is better than implicit ;).

Where I was touching the line, I also updated the string formatting in
StaticGenerator.generate_output to use the forward compatible
'{}'.format() syntax.

[1]: http://docs.python.org/2/library/os.path.html#os.path.relpath
2013-01-18 07:57:35 -05: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
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
088c810b00 Change the way to compute relative paths to avoid the leading .././ when using
relative urls.
2012-11-29 21:50:46 +01:00
Bruno Binet
324c7c3674 Merge branch 'bstpierre-files-to-copy-missing-dir' 2012-10-25 14:25:03 +02:00
Bruno Binet
b6cc6bd2d4 remove useless try/except clause
exception will be caught and logged later in Pelican stack
2012-10-25 14:24:17 +02:00
Brendan Wholihan
bc0f7ae4f6 Amended utils copy so that a warning is produced if a source file is not found in FILES_TO_COPY whilst copying. eg if there is a typo in the file name, or the file is moved. 2012-10-20 16:35:24 +01:00
Brian St. Pierre
01293dedaa Fix #530: FILES_TO_COPY error when dest dir missing
If the destination directory specified by FILES_TO_COPY does not
exist, site generation crashes with a CRITICAL error. This creates the
destination if it does not exist.
2012-10-02 19:17:43 -04:00
Brian St. Pierre
15875b8bd1 Fix DELETE_OUTPUT_DIRECTORY crash when no output dir 2012-10-02 08:51:31 -04:00
Wladislaw Merezhko
0c2625e59d Change name of utils.open function to pelican_open and refactor this change across project. 2012-09-08 13:07:51 +03:00
tBunnyMan
a37ba369ef Implemented better "valid files not found" behavior.
Used an exception so show error state.
Used a bool flag to make sure the error is only shown once PER error.
Updated tests to check for the correct Exception raised
2012-08-23 12:44:22 -07:00
tBunnyMan
86da6d1f2e Check for value error caused by no valid files found with files_changed
This causes an infinite loop when in auto-reload
Fix #467
Fix #451
Fix #443
2012-08-23 11:05:07 -07:00
Leonard Huang
6f40e452e1 Add unidecode for translating slugs in asian languages 2012-07-16 11:36:20 +08:00
dave mankoff
3c30425276 Merge branch 'master' of git://github.com/ametaireau/pelican 2012-07-09 22:15:04 -04:00
tBunnyMan
4427424db3 Changed debugging reporting to post file deletion instead of pre file deletion per request. 2012-07-04 15:20:15 -07:00
tBunnyMan
d589450200 Change behavior of DELETE_OUTPUT_DIRECTORY to purge contents of the directory, not the directory itself.
Added Debug level logging for each deletion
Added error level logging when a delete has an exception
Built a test case for clean_output_directory in tests.utils.py
Updated `settings` in documentation to reflect new behavior
Removed the tip from the bottom of getting started since this setting should no longer break web servers pointing to the output directory.
2012-07-04 12:32:20 -07:00
dave mankoff
caa4442abb re-import cgi. properly turn utils.open into a context manager 2012-06-20 19:59:32 -04:00
Alexis Metaireau
ed8b8bc27e Also reload when the settings file changes.
Fix for #360
2012-06-10 00:24:26 +02:00
Simon
4a0d4461e1 Apply typogrify on the title.
As it is done when reading the file, we need to remove html tags for the
permalink and the slug (this is done here for the notmyidea and simple themes).

While modifying the themes I also replaced the `pagename` template tag with
`article.url` (`pagename` was an empty variable, no more used ?).
2012-05-07 12:26:17 +02:00
Alexis Metaireau
ebe5c0b2bf Enhance warnings. Fix #196 2012-04-01 13:37:35 +02:00
Andrea Crotti
0922efa371 change the way logging is done, using the standard log tree instead of
calling the module-level functions on an unitialised logging object.

This allows to
- simplify log.py
- use one logger object for each file
2012-03-20 13:01:21 +00:00
Simon
39bdbcfd86 files_changed: cleanup and add a test 2012-03-14 12:36:55 +01:00
draftcode
2827a6df47 Fixed some typos. 2012-03-12 01:22:54 +09:00
Alexis Metaireau
c393b011c4 cleaning 2012-03-11 15:50:53 +01:00
Alexis Metaireau
6cde7fd27a PEP8-ify.
Wrap to 80 chars, sanitize imports.
2012-03-09 16:21:38 +01:00
Stéphane Raimbault
9cced6be83 Sort imports and remove trailing whitespaces 2012-02-28 17:40:13 +01:00
Stéphane Raimbault
c699172fd6 Removed useless imports 2012-02-28 17:37:17 +01:00
Jökull Sólberg Auðunsson
4144c8d76f More forgiving date strings. 2011-11-23 20:35:18 +00:00
Rémy HUBSCHER
32a6ecbcc5 Fix timezone bug for ATOM generation 2011-08-16 15:11:49 +02:00
Rémy HUBSCHER
acb65b77af GMT Time in ATOM feeds 2011-08-16 11:40:08 +02:00
Borgar
a6dc53fe20 Adding a date format with seconds. 2011-06-29 13:40:35 +00:00
Alen Mujezinovic
c5ffe377df European date format parsing. 2011-06-01 14:27:08 -07:00
derdon
93d0ad25d1 simplify some code in utils.files_changed 2011-05-14 17:08:04 +02:00
Alexis Metaireau
04da794b6b Add a feature to copy files from src to dest.
Fixes #86
2011-05-07 22:47:30 +01:00
Alexis Metaireau
e09444fa89 Don't delete the output dir as a default behaviour.
Fixes #107
2011-05-07 19:27:33 +01:00
Ronny Pfannschmidt
24c3447d6c make file-times directly use walk, also skip dot-dirs 2011-05-06 21:04:29 +02:00
Ronny Pfannschmidt
b270c1bac4 stupidly replace rmtree by a pass, since we dont want to rmtree the output dir 2011-05-06 19:29:01 +02:00
Ronny Pfannschmidt
9c99db7119 better log info for doubls slug/empty slug 2011-05-06 19:24:25 +02:00
Ronny Pfannschmidt
0441127c41 logging star import cleanups 2011-05-06 19:23:37 +02:00
Skami18
3166e6dfe3 Calls to «print» replaced by the «pelican.log» module. 2011-04-19 14:49:46 +02:00
Alexis Metaireau
7b4d5e8317 remove 'except as' for python 2.5 compat 2011-02-18 13:34:26 +00:00
Alexis Metaireau
b8fb45de9e Add the autoreload feature. This fixes #45. I've choosen to not serve the content
via HTTP, because it's really simple to do "firefox output/index.html".
2011-01-12 23:45:06 +01:00
Alexis Metaireau
2f915caff2 branch merge
Conflicts:
	pelican/generators.py
	pelican/settings.py
2011-01-05 18:25:14 +01:00
Alexis Metaireau
79576f25b6 Fix translation feature. Add translation support to the notmyidea theme. 2011-01-05 16:22:52 +01:00
Alexander Artemenko
01b4c06916 Custom bicycle 'update_dict' was replaced with 'collections.defaultdict'. 2010-12-26 23:59:30 +03:00