1
0
Fork 0
forked from github/pelican

Only parse the files with the markup extension.

This commit is contained in:
Alexis Metaireau 2010-08-18 16:07:28 +02:00
commit 316d84ebb9
2 changed files with 3 additions and 2 deletions

2
TODO
View file

@ -1,4 +1,4 @@
* Fall back to settings + date of files when no metadata available
* Filter to generate only the files with .rst extension
* Add RSS generation
* Add a licence
* package it !

View file

@ -44,7 +44,8 @@ def generate_output(path=None, theme=None, output_path=None, markup=None,
# get the list of files to parse
files = []
for root, dirs, temp_files in os.walk(path, followlinks=True):
files.extend([os.sep.join((root, f)) for f in temp_files])
files.extend([os.sep.join((root, f)) for f in temp_files
if f.endswith('.%s' % markup)])
articles, dates, years, tags, categories = [], {}, {}, {}, {}
# for each file, get the informations.