diff --git a/TODO b/TODO index 55456ea9..d08bdae9 100644 --- a/TODO +++ b/TODO @@ -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 ! diff --git a/pelican/generator.py b/pelican/generator.py index b44285e0..fa9006f7 100644 --- a/pelican/generator.py +++ b/pelican/generator.py @@ -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.