X-Git-Url: https://projects.mako.cc/source/iron-blogger/blobdiff_plain/55f36b4a0963d73bce138057dcf9a69510511a2b..7d6ef92de21ab4f0b5699aca9bc846410040c2ef:/weekly-update.py?ds=inline diff --git a/weekly-update.py b/weekly-update.py index 7a44dff..9cd240c 100755 --- a/weekly-update.py +++ b/weekly-update.py @@ -7,9 +7,7 @@ import subprocess import datetime import yaml -XMLRPC_ENDPOINT = 'http://iron-blogger.mako.cc/xmlrpc.php' -USER = 'mako' -BLOG_ID = 1 +from config import * dry_run = False @@ -34,11 +32,11 @@ punt = [] with open('ledger', 'a') as f: f.write("\n") for (user, debt) in debts: - if debt < 30: continue + if debt <= (FINE_SIZE * 6): continue punt.append(user) f.write("""\ %(date)s Punt - Pool:Owed:%(user)s $-%(debt)s + Pool:Owed:%(user)s -%(debt)s User:%(user)s """ % {'user': user, 'debt': debt, 'date': date}) @@ -76,7 +74,7 @@ if punt: bloggers = yaml.safe_load(b) for p in punt: if 'end' not in bloggers[p]: - bloggers[p]['end'] = date + bloggers[p]['end'] = datetime.date(*map(int, date.split("-"))) with open('bloggers.yml','w') as b: yaml.safe_dump(bloggers, b)