mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
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:
parent
3b7c546136
commit
836d4ea117
12 changed files with 474 additions and 345 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue