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:

% if punt: -

Who was punted for outstanding balances:

+

Ausgeschieden wegen zu hoher Schulden: