translation
This commit is contained in:
parent
0ceea17cba
commit
e5c650ab09
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
Results for week beginning ${week_start.strftime("%F")}
|
||||
<h2>Who posted:</h2>
|
||||
Zusammenfassung für die Woche ab ${week_start.strftime("%d.%m.%Y")}:
|
||||
<h3>Die Fleißigen:</h3>
|
||||
<dl>
|
||||
% for u in sorted(good, key=lambda u:u.username):
|
||||
% for u in sorted(good, key=lambda u:u.name[u.name.rfind(' '):].lower()):
|
||||
<dt><span class="user"><strong>${u.name} </strong> \
|
||||
% if u.twitter != False:
|
||||
<a href="https://twitter.com/#!/${u.username}">@${u.username}</a> \
|
||||
@<a href="http://twitter.com/${u.username}">${u.username}</a> \
|
||||
% endif
|
||||
:</span></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
% for p in u.weeks[week]:
|
||||
<li><a href="${p['url']}">${p['title'] or "[untitled post]"}</a></li>
|
||||
<li><a href="${p['url']}">${p['title'] or "[ohne Titel]"}</a></li>
|
||||
% endfor
|
||||
</ul>
|
||||
</dd>
|
||||
% endfor
|
||||
</dl>
|
||||
|
||||
<h2>Slackers:</h2>
|
||||
<h3>Die Faulen:</h3>
|
||||
<ul>
|
||||
% for u in sorted(lame, key=lambda u:u.username):
|
||||
% for u in sorted(lame, key=lambda u:u.name[u.name.rfind(' '):].lower()):
|
||||
<li class="user"><strong>${u.name} </strong> \
|
||||
% if u.twitter != False:
|
||||
<a href="https://twitter.com/#!/${u.username}">@${u.username}</a> \
|
||||
@<a href="http://twitter.com/${u.username}">${u.username}</a> \
|
||||
% endif
|
||||
</li>
|
||||
% endfor
|
||||
</ul>
|
||||
|
||||
% if punt:
|
||||
<h2>Who was punted for outstanding balances:</h2>
|
||||
<h3>Ausgeschieden wegen zu hoher Schulden:</h3>
|
||||
<ul>
|
||||
% for u in sorted(punt):
|
||||
<li class="user">${u}</li>
|
||||
|
@ -38,12 +38,12 @@ Results for week beginning ${week_start.strftime("%F")}
|
|||
% endif
|
||||
|
||||
% if skip:
|
||||
<h2>Who haven't started yet:</h2>
|
||||
<h3>Noch nicht dabei:</h3>
|
||||
<ul>
|
||||
% for u in sorted(skip, key=lambda u:u.username):
|
||||
% for u in sorted(skip, key=lambda u:u.name[u.name.rfind(' '):].lower()):
|
||||
<li class="user"><strong>${u.name} </strong> \
|
||||
% if u.twitter != False:
|
||||
- <a href="https://twitter.com/#!/${u.username}">@${u.username}</a> \
|
||||
@<a href="http://twitter.com/${u.username}">${u.username}</a> \
|
||||
% endif
|
||||
</li>
|
||||
% endfor
|
||||
|
@ -51,27 +51,27 @@ Results for week beginning ${week_start.strftime("%F")}
|
|||
% endif
|
||||
|
||||
% if skipped_users:
|
||||
<h2>Who is currently skipped:</h2>
|
||||
<h3>Gerade im Urlaub:</h3>
|
||||
<ul>
|
||||
% 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()):
|
||||
<li class="user"><strong>${u.name} </strong> \
|
||||
% if u.twitter != False:
|
||||
- <a href="https://twitter.com/#!/${u.username}">@${u.username}</a> \
|
||||
@<a href="http://twitter.com/${u.username}">${u.username}</a> \
|
||||
% endif
|
||||
</li>
|
||||
% endfor
|
||||
</ul>
|
||||
% endif
|
||||
|
||||
<h2>Beer fund:</h2>
|
||||
<h3>Kasse:</h3>
|
||||
<table style="border-left-style:none; border-right-style:none;">
|
||||
<tr> <td> This week: </td> <td> € ${5 * len(lame)} </td> </tr>
|
||||
<tr> <td> Total: </td> <td> € ${pool} </td> </tr>
|
||||
<tr> <td> Paid: </td> <td> € ${paid} </td> </tr>
|
||||
<tr> <td> Events: </td> <td> € ${event} </td> </tr>
|
||||
<tr> <td> Diese Woche: </td> <td> ${5 * len(lame)} € </td> </tr>
|
||||
<tr> <td> Insgesamt: </td> <td> ${pool} €</td> </tr>
|
||||
<tr> <td> Beglichen: </td> <td> ${paid} €</td> </tr>
|
||||
<tr> <td> verfeiert: </td> <td> ${event} €</td> </tr>
|
||||
</table>
|
||||
|
||||
<h2>Debts:</h2>
|
||||
<h3>Schulden:</h3>
|
||||
<% i = 0 %>
|
||||
<table class="debts" style="border-left-style:none; border-right-style:none;">
|
||||
% 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
|
||||
</table>
|
||||
|
||||
<h2>Previously Punted (pay €30 to return):</h2>
|
||||
<h3>Zuvor ausgeschieden (müssen 30 € für den Wiedereinstieg bezahlen):</h3>
|
||||
<ul>
|
||||
% for (u) in sorted(punted, key=lambda p:p.username):
|
||||
<li>${u.username} (${u.end})</li>
|
||||
% for (u) in sorted(punted, key=lambda p:p.name[p.name.rfind(' '):].lower()):
|
||||
<li>${u.name} (seit ${u.end_de})</li>
|
||||
% endfor
|
||||
</ul>
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue