From e12ad79a4afa786eeaa2665dc1888b96e896a2b1 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 20 May 2014 18:47:58 +0400 Subject: [PATCH] =?utf8?q?=D0=92=20=D0=B8=D0=BD=D0=B4=D0=B5=D0=BA=D1=81?= =?utf8?q?=D0=B5=20=D0=B1=D0=BB=D0=BE=D0=B3=D0=B0=20=D0=B2=20=D1=80=D0=B0?= =?utf8?q?=D0=B7=D0=B1=D0=B8=D0=B2=D0=BA=D0=B5=20=D0=BF=D0=BE=20=D0=B3?= =?utf8?q?=D0=BE=D0=B4=D0=B0=D0=BC=20=D0=BF=D0=BE=D0=BA=D0=B0=D0=B7=D1=8B?= =?utf8?q?=D0=B2=D0=B0=D1=82=D1=8C=20=D0=BA=D0=BE=D0=BB-=D0=B2=D0=BE=20?= =?utf8?q?=D0=B7=D0=B0=D0=BF=D0=B8=D1=81=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- reindex_blog.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/reindex_blog.py b/reindex_blog.py index 197c1c6..645dd82 100755 --- a/reindex_blog.py +++ b/reindex_blog.py @@ -264,13 +264,20 @@ def write_template(level, year, month, day, titles, tags=None): new_text.append('''

ðÏ ÇÏÄÁÍ: ''') + + year_counts = {} + for year, month, day, file, title, lead in all_titles: + year_counts[year] = 0 + for year, month, day, file, title, lead in all_titles: + year_counts[year] += 1 + first_year = True for year in years: if first_year: first_year = False else: new_text.append(' - ') - new_text.append('%s' % (year, year)) + new_text.append('%s (%d)' % (year, year, year_counts[str(year)])) new_text.append('''

''') -- 2.39.5