From 316d84ebb981ec8e77cd79367e6d18055db9be30 Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Wed, 18 Aug 2010 16:07:28 +0200 Subject: [PATCH] Only parse the files with the markup extension. --- TODO | 2 +- pelican/generator.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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.