]> projects.mako.cc - iron-blogger/commitdiff
Use show-week to generate the overall template, too.
authorNelson Elhage <nelhage@mit.edu>
Tue, 29 Dec 2009 19:06:12 +0000 (14:06 -0500)
committerNelson Elhage <nelhage@mit.edu>
Tue, 29 Dec 2009 19:06:12 +0000 (14:06 -0500)
generate-page.py [deleted file]
templates/iron-blogger.tmpl

diff --git a/generate-page.py b/generate-page.py
deleted file mode 100755 (executable)
index 9495e6b..0000000
+++ /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)
index 10f3c93d4637748a4315ac9aeeaf0d7dc9f0a080..e0620afc2192c83711c9ff0a52a338762d874baf 100644 (file)
           <th style='width: 10em'>Blog link</th>
           <th>Start Week</th>
         </tr>
-% for u in users:
+% for u in userlist:
         <tr>
           <td><tt> ${u.username} </tt></td>
           <td>

Benjamin Mako Hill || Want to submit a patch?