From: Nelson Elhage Date: Tue, 1 Jun 2010 00:54:47 +0000 (-0400) Subject: AUTOPUNT X-Git-Url: https://projects.mako.cc/source/iron-blogger/commitdiff_plain/d9449b6b588a35f54b61698de5f82ebde11af118?hp=81be85441f9314f889d3bccb73c2f9e5fa70fb4a AUTOPUNT --- diff --git a/render.py b/render.py index f226adb..cacd90d 100755 --- a/render.py +++ b/render.py @@ -33,7 +33,7 @@ def get_debts(): debts.append((user, val)) return debts -def render_template(path, week=None): +def render_template(path, week=None, **kwargs): with open('out/report.yml') as r: report = yaml.safe_load(r) @@ -93,7 +93,7 @@ def render_template(path, week=None): week=week, week_start=week_start,week_end=week_end, good=good, lame=lame, skip=skip, userlist=userlist, pool=get_balance('Pool'), paid=get_balance('Pool:Paid'), - debts=debts) + debts=debts, **kwargs) if __name__ == '__main__': if len(sys.argv) < 2: diff --git a/templates/email.txt b/templates/email.txt index d98a6b5..aaeff73 100644 --- a/templates/email.txt +++ b/templates/email.txt @@ -2,6 +2,7 @@ Subject: IRON BLOGGER results for the week beginning ${week_start.strftime("%F") To: iron-blogger@mit.edu SLACKERS: ${", ".join(sorted([u.username for u in lame]))} +PUNTED for balance greater than $30: ${", ".join(sorted(punt))} People who posted: % for u in sorted(good, key=lambda u:u.username): diff --git a/templates/week.tmpl b/templates/week.tmpl index d4ca365..0672bf4 100644 --- a/templates/week.tmpl +++ b/templates/week.tmpl @@ -20,6 +20,15 @@ Results for week beginning ${week_start.strftime("%F")} % endfor +% if punt: +

People punted for excessive outstanding balances:

+ +% endif + % if skip:

People who have not yet started