]> git.phdru.name Git - phdru.name/phdru.name.git/commitdiff
I started the blog in 2005.
authorOleg Broytman <phd@phdru.name>
Sat, 17 Nov 2007 22:20:06 +0000 (22:20 +0000)
committerOleg Broytman <phd@phdru.name>
Sat, 17 Nov 2007 22:20:06 +0000 (22:20 +0000)
git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@73 7bb0bf08-9e0d-0410-b083-99cee3bf18b8

reindex_blog.py

index 29d58d59c9925163dfe7be4e916a4b0796fde6c3..7fbf9ed10afaf491a90af7d7bdea71add0abdf07 100755 (executable)
@@ -84,7 +84,6 @@ if blog <> old_blog:
    pickle.dump(blog, blog_file, pickle.HIGHEST_PROTOCOL)
    blog_file.close()
 
-
 # Localized month names
 
 import locale
@@ -250,11 +249,14 @@ def write_template(level, year, month, day, titles, tags=None):
 </p>
 ''')
 
+      max_year = int(sorted(years.keys())[-1])
+      years = range(2005, max_year+1)
+
       new_text.append('''
 <p class="head">По годам:
 ''')
       first_year = True
-      for year in sorted(years.keys()):
+      for year in years:
          if first_year:
             first_year = False
          else: