X-Git-Url: https://projects.mako.cc/source/iron-blogger/blobdiff_plain/a62186167d0f2c82668c5e10df438391e3a84f01..6b0e416bb9b404c035ed907e32b48906ef502c75:/weekly-update.py?ds=sidebyside diff --git a/weekly-update.py b/weekly-update.py index f55c69c..eddb2c1 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 @@ -19,7 +17,6 @@ if args[0] == '-n': args = args[1:] date = args[0] -today = str(datetime.date.today()) with open('ledger', 'a') as f: f.write("\n") @@ -35,13 +32,13 @@ 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("""\ -%(today)s Punt - Pool:Owed:%(user)s $-%(debt)s +%(date)s Punt + Pool:Owed:%(user)s -%(debt)s User:%(user)s -""" % {'user': user, 'debt': debt, 'today': today}) +""" % {'user': user, 'debt': debt, 'date': date}) if not dry_run: