From: Oleg Broytman Date: Wed, 1 Mar 2006 20:53:33 +0000 (+0000) Subject: Exchanged filename and title in the blog values. X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=85d971f16ca59fcc4d628d5a248d1eb313c02519;p=phdru.name%2Fphdru.name.git Exchanged filename and title in the blog values. git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@10 7bb0bf08-9e0d-0410-b083-99cee3bf18b8 --- diff --git a/reindex_blog.py b/reindex_blog.py index 1539849..7e39798 100755 --- a/reindex_blog.py +++ b/reindex_blog.py @@ -31,7 +31,7 @@ else: blog_file.close() -# blog is a dictionary mapping (year, month, day) => (title, filename, lead) +# blog is a dictionary mapping (year, month, day) => (filename, title, lead) blog = {} years = {} @@ -49,7 +49,7 @@ for dirpath, dirs, files in os.walk(os.curdir): if title: year, month, day = dirpath.split(os.sep)[1:] - blog[year, month, day] = (title, os.path.basename(file), lead) + blog[year, month, day] = (os.path.basename(file), title, lead) if year in years: months = years[year] @@ -241,7 +241,7 @@ for year in sorted(years.keys()): day_titles = [] key = year, month, day if key in blog: - title, tmpl, lead = blog[key] + tmpl, title, lead = blog[key] if tmpl.endswith(".tmpl"): tmpl = tmpl[:-len("tmpl")] + "html" all_titles.append((key, tmpl, title, lead)) year_titles.append((key, tmpl, title, lead))