]> git.phdru.name Git - phdru.name/phdru.name.git/commitdiff
If there is only one entry for the day - redirect from day index to the entry.
authorOleg Broytman <phd@phdru.name>
Fri, 3 Mar 2006 18:28:52 +0000 (18:28 +0000)
committerOleg Broytman <phd@phdru.name>
Fri, 3 Mar 2006 18:28:52 +0000 (18:28 +0000)
git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@14 7bb0bf08-9e0d-0410-b083-99cee3bf18b8

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"