]> git.phdru.name Git - phdru.name/phdru.name.git/blobdiff - reindex_blog.py
If there is only one entry for the day - redirect from day index to the entry.
[phdru.name/phdru.name.git] / reindex_blog.py
index cf830d1cb94ced402bf1a9cf3502f3afe439cfc1..b21f4f6d245d269e9d130f616a119f0993ed92d0 100755 (executable)
@@ -154,6 +154,11 @@ def write_template(level, year, month, day, titles):
       iday = int(day)
       imonth = int(month)
 
+      if len(titles) == 1:
+         new_text.append("""\
+#attr $refresh = "0; URL=%s"
+""" % titles[0][3])
+
       new_text.append("""\
 #attr $Title = "Oleg BroytMann's blog: %(day)d %(month_abbr_en)s %(year)s"
 #attr $Description = "BroytMann Russian Blog %(day)d %(month_name_en)s %(year)s Index Document"