X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=reindex_blog.py;h=bb315179cf75f8c90ba4d508094b486b9f3da4ee;hb=d4a8101f56c22a7b3ac880252ef4caa349d68959;hp=197c1c6956db3b3972f1a41a01791b607a3fc1b8;hpb=de7b8fd4faef91c9cb69be86e18697752ef89fe5;p=phdru.name%2Fphdru.name.git diff --git a/reindex_blog.py b/reindex_blog.py index 197c1c6..bb31517 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('''

''') @@ -345,7 +352,29 @@ new_text = ["""\ #def body_html

ôÅÇÉ

-

+

+æÏÒÍÁ ÐÏÉÓËÁ ÐÏÚ×ÏÌÑÅÔ ÉÓËÁÔØ ÓÏÏÂÝÅÎÉÑ × ÂÌÏÇÅ, ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÅ ×ÙÒÁÖÅÎÉÀ. +óÉÎÔÁËÓÉÓ ×ÙÒÁÖÅÎÉÑ:

+ +

+ðÒÉÍÅÒÙ ×ÙÒÁÖÅÎÉÊ: linux - ÐÒÏÉÚÏÊÄ£Ô ÐÅÒÅÎÁÐÒÁ×ÌÅÎÉÅ +ÎÁ ÓÔÒÁÎÉÃÕ linux.html; linux&!audio - ÉÓËÁÔØ ÚÁÐÉÓÉ × ËÏÔÏÒÙÈ ÅÓÔØ ÔÅÇ +linux É ÎÅÔ ÔÅÇÁ audio; linux and not audio - ÔÏ ÖÅ ÓÁÍÏÅ. +

+ +
+
+ + +
+
+
"""] @@ -398,7 +427,6 @@ for i, (count, tag, links) in enumerate(all_tags): #def body_html

%s

-

-

#end def $phd_site.respond(self) """) @@ -423,7 +450,6 @@ $phd_site.respond(self) new_text.append("""\
-

#end def $phd_site.respond(self) """)