From 67485be240edea075933b9c2349d308934e20988 Mon Sep 17 00:00:00 2001 From: Nicolas Steinmetz Date: Tue, 30 Aug 2011 15:11:30 +0300 Subject: [PATCH] Fix #164, by "slugifying" titles (which for generated filename is also better imho) + a few remplacement of ".rst" by the "ext" variable. --- tools/pelican-import | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/pelican-import b/tools/pelican-import index 44f02fbd..64ce23f9 100755 --- a/tools/pelican-import +++ b/tools/pelican-import @@ -120,7 +120,7 @@ def dc2fields(file): content = content.replace('\\n', '') post_format = "html" - yield (post_title, content, post_url, post_creadt, author, categories, tags, post_format) + yield (post_title, content, slugify(post_title), post_creadt, author, categories, tags, post_format) def feed2fields(file): @@ -175,7 +175,7 @@ def fields2pelican(fields, output_path, dircat=False): # option to put files in directories with categories names if dircat and (len(categories) == 1): catname = categories[0] - out_filename = os.path.join(output_path, catname, filename+'.rst') + out_filename = os.path.join(output_path, catname, filename+ext) if not os.path.isdir(os.path.join(output_path, catname)): os.mkdir(os.path.join(output_path, catname)) else: