From 1a648181be34b35652a7982a969852710ca18af3 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 3 Mar 2006 18:28:52 +0000 Subject: [PATCH] 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 --- reindex_blog.py | 5 +++++ 1 file changed, 5 insertions(+) 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" -- 2.39.5