Use show-week to generate the overall template, too.
This commit is contained in:
parent
c631489c69
commit
bf1fb66fb4
|
@ -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)
|
|
|
@ -105,7 +105,7 @@
|
||||||
<th style='width: 10em'>Blog link</th>
|
<th style='width: 10em'>Blog link</th>
|
||||||
<th>Start Week</th>
|
<th>Start Week</th>
|
||||||
</tr>
|
</tr>
|
||||||
% for u in users:
|
% for u in userlist:
|
||||||
<tr>
|
<tr>
|
||||||
<td><tt> ${u.username} </tt></td>
|
<td><tt> ${u.username} </tt></td>
|
||||||
<td>
|
<td>
|
||||||
|
|
Loading…
Reference in New Issue