diff --git a/render.py b/render.py
index 980e27d..735df0f 100755
--- a/render.py
+++ b/render.py
@@ -103,6 +103,7 @@ def render_template(path, week=None, **kwargs):
# create a subset of punted users
if u.end:
+ u.end_de = datetime.datetime.strptime(rec.get('end'),"%Y/%m/%d").strftime("%d.%m.%Y")
punted.append(u)
def user_key(u):
diff --git a/templates/email.txt b/templates/email.txt
index 904b70f..36e7279 100644
--- a/templates/email.txt
+++ b/templates/email.txt
@@ -8,8 +8,8 @@ PUNTED for balance ≥$30: ${", ".join(sorted(punt))}
% endif
People who posted:
-% for u in sorted(good, key=lambda u:u.name[u.name.find(' '):].lower()):
- ${u.username}:
+% for u in sorted(good, key=lambda u:u.name[u.name.rfind(' '):].lower()):
+ ${u.name} (${u.username}):
% for p in u.weeks[week]:
- ${p['url']}
% endfor
diff --git a/templates/week.tmpl b/templates/week.tmpl
index 77a8377..f0807bc 100644
--- a/templates/week.tmpl
+++ b/templates/week.tmpl
@@ -1,35 +1,35 @@
-Results for week beginning ${week_start.strftime("%F")}
-
Who posted:
+Zusammenfassung für die Woche ab ${week_start.strftime("%d.%m.%Y")}:
+Die Fleißigen:
-% for u in sorted(good, key=lambda u:u.username):
+% for u in sorted(good, key=lambda u:u.name[u.name.rfind(' '):].lower()):
- ${u.name} \
% if u.twitter != False:
- @${u.username} \
+ @${u.username} \
% endif
:
-
% endfor
-Slackers:
+Die Faulen:
-% for u in sorted(lame, key=lambda u:u.username):
+% for u in sorted(lame, key=lambda u:u.name[u.name.rfind(' '):].lower()):
- ${u.name} \
% if u.twitter != False:
- @${u.username} \
+ @${u.username} \
% endif
% endfor
% if punt:
-Who was punted for outstanding balances:
+Ausgeschieden wegen zu hoher Schulden:
% for u in sorted(punt):
- ${u}
@@ -38,12 +38,12 @@ Results for week beginning ${week_start.strftime("%F")}
% endif
% if skip:
-Who haven't started yet:
+Noch nicht dabei:
-% for u in sorted(skip, key=lambda u:u.username):
+% for u in sorted(skip, key=lambda u:u.name[u.name.rfind(' '):].lower()):
- ${u.name} \
% if u.twitter != False:
- - @${u.username} \
+ @${u.username} \
% endif
% endfor
@@ -51,27 +51,27 @@ Results for week beginning ${week_start.strftime("%F")}
% endif
% if skipped_users:
-Who is currently skipped:
+Gerade im Urlaub:
-% for u in sorted(skipped_users, key=lambda u:u.username):
+% for u in sorted(skipped_users, key=lambda u:u.name[u.name.rfind(' '):].lower()):
- ${u.name} \
% if u.twitter != False:
- - @${u.username} \
+ @${u.username} \
% endif
% endfor
% endif
-Beer fund:
+Kasse:
- This week: | € ${5 * len(lame)} |
- Total: | € ${pool} |
- Paid: | € ${paid} |
- Events: | € ${event} |
+ Diese Woche: | ${5 * len(lame)} € |
+ Insgesamt: | ${pool} € |
+ Beglichen: | ${paid} € |
+ verfeiert: | ${event} € |
-Debts:
+Schulden:
<% i = 0 %>
% for (u, v) in sorted(debts, key=lambda p:p[1], reverse=True):
@@ -89,9 +89,9 @@ Results for week beginning ${week_start.strftime("%F")}
%endif
-Previously Punted (pay €30 to return):
+Zuvor ausgeschieden (müssen 30 € für den Wiedereinstieg bezahlen):
-% for (u) in sorted(punted, key=lambda p:p.username):
-- ${u.username} (${u.end})
+% for (u) in sorted(punted, key=lambda p:p.name[p.name.rfind(' '):].lower()):
+- ${u.name} (seit ${u.end_de})
% endfor
diff --git a/weekly-update.py b/weekly-update.py
index 5cae775..3edfea6 100755
--- a/weekly-update.py
+++ b/weekly-update.py
@@ -58,15 +58,8 @@ if not dry_run:
page = dict(title = title, description = body)
- try:
- subprocess.call(['stty', '-echo'])
- passwd = raw_input("Password for %s: " % (config['username'],))
- print
- finally:
- subprocess.call(['stty', 'echo'])
-
x = xmlrpclib.ServerProxy(config['xmlrpc_endpoint'])
- x.metaWeblog.newPost(config['blog_id'], config['username'], passwd, page, True)
+ x.metaWeblog.newPost(config['blog_id'], config['username'], config['password'], page, True)
email = render.render_template('templates/email.txt', date, punt=punt,mail=config['mail'])
if quick_view:
print(render.render_template('templates/quick_view.tmpl',date,punt=punt))