From b4c1e4de6a50d04c81519eaf3dc440cca1e38da4 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 8 Mar 2006 20:39:09 +0000 Subject: [PATCH] Write lead and title in tags indices. git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@21 7bb0bf08-9e0d-0410-b083-99cee3bf18b8 --- reindex_blog.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/reindex_blog.py b/reindex_blog.py index 44647bf..4451baa 100755 --- a/reindex_blog.py +++ b/reindex_blog.py @@ -279,7 +279,7 @@ for year in sorted(years.keys()): tag_links = all_tags[tag] else: tag_links = all_tags[tag] = [] - tag_links.append('/'.join(("..", year, month, day, file))) + tag_links.append(value) write_template(3, year, month, day, day_titles) write_template(2, year, month, day, month_titles) write_template(1, year, month, day, year_titles) @@ -324,9 +324,13 @@ for count, tag, links in all_tags: """ % (tag, tag, tag)] count = 0 - for link in reversed(links): - junk, year, month, day, filename = link.split('/') - item_text = """
  • %s/%s/%s: %s
  • """ % (link, year, month, day, filename) + for year, month, day, filename, title, lead in reversed(links): + if lead: + lead = lead + ' ' + else: + lead = '' + link = "../%s/%s/%s/%s" % (year, month, day, filename) + item_text = """
  • %s/%s/%s: %s%s
  • """ % (link, year, month, day, lead, title) count += 1 if count <= 5: -- 2.39.5