From: Oleg Broytman Date: Fri, 3 Mar 2006 18:28:52 +0000 (+0000) Subject: If there is only one entry for the day - redirect from day index to the entry. X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=1a648181be34b35652a7982a969852710ca18af3;p=phdru.name%2Fphdru.name.git If there is only one entry for the day - redirect from day index to the entry. git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@14 7bb0bf08-9e0d-0410-b083-99cee3bf18b8 --- diff --git a/reindex_blog.py b/reindex_blog.py index cf830d1..b21f4f6 100755 --- a/reindex_blog.py +++ b/reindex_blog.py @@ -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"