From bf1fb66fb40e3ad7a6bb8a3c361aa3318cfc0331 Mon Sep 17 00:00:00 2001 From: Nelson Elhage Date: Tue, 29 Dec 2009 14:06:12 -0500 Subject: [PATCH] Use show-week to generate the overall template, too. --- generate-page.py | 25 ------------------------- templates/iron-blogger.tmpl | 2 +- 2 files changed, 1 insertion(+), 26 deletions(-) delete mode 100755 generate-page.py diff --git a/generate-page.py b/generate-page.py deleted file mode 100755 index 9495e6b..0000000 --- a/generate-page.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/python -import yaml -from mako.template import Template - -with open('bloggers.yml') as f: - users = yaml.safe_load(f.read()) - -class User(object): - pass - -all = [] -for (un, rec) in users.items(): - u = User() - u.username = un - u.links = rec['links'] - u.start = rec['start'] - all.append(u) - -def user_key(u): - return (u.start, u.username) - -all.sort(key=user_key) - -tmpl = Template(filename='templates/iron-blogger.tmpl', output_encoding='utf-8') -print tmpl.render(users=all) diff --git a/templates/iron-blogger.tmpl b/templates/iron-blogger.tmpl index 10f3c93..e0620af 100644 --- a/templates/iron-blogger.tmpl +++ b/templates/iron-blogger.tmpl @@ -105,7 +105,7 @@ Blog link Start Week -% for u in users: +% for u in userlist: ${u.username}