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 = {}
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]
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))