Refactoring, Again :)

Added some more notes about how this is working on the documentation. I do think
that the overall structure is clearer now, and easiest to understand. After all,
that's how it should always be !

--HG--
rename : pelican/processors.py => pelican/generators.py
rename : pelican/generators.py => pelican/writers.py
This commit is contained in:
Alexis Metaireau 2010-12-02 03:22:24 +00:00
commit 836d4ea117
12 changed files with 474 additions and 345 deletions

View file

@ -64,6 +64,7 @@ def copytree(path, origin, destination, topath=None):
except OSError:
pass
def clean_output_dir(path):
"""Remove all the files from the output directory"""
@ -73,6 +74,12 @@ def clean_output_dir(path):
except Exception as e:
pass
def get_relative_path(filename):
"""Return the relative path to the given filename"""
return '../' * filename.count('/') + '.'
def truncate_html_words(s, num, end_text='...'):
"""Truncates HTML to a certain number of words (not counting tags and
comments). Closes opened tags if they were correctly closed in the given