projects
/
iron-blogger
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
expanded the number of items on planet to 40
[iron-blogger]
/
weekly-update.py
diff --git
a/weekly-update.py
b/weekly-update.py
index 4aa749c6156cf0d2cfae51df841b337028bb54d1..06d85182d84c5cbf127967e0f76837fa970baf62 100755
(executable)
--- a/
weekly-update.py
+++ b/
weekly-update.py
@@
-7,8
+7,8
@@
import subprocess
import datetime
import yaml
import datetime
import yaml
-XMLRPC_ENDPOINT = 'http://iron-blogger.m
it.edu
/xmlrpc.php'
-USER = '
nelhage
'
+XMLRPC_ENDPOINT = 'http://iron-blogger.m
ako.cc
/xmlrpc.php'
+USER = '
mako
'
BLOG_ID = 1
dry_run = False
BLOG_ID = 1
dry_run = False
@@
-25,8
+25,9
@@
with open('ledger', 'a') as f:
f.write("\n")
f.write(render.render_template('templates/ledger', date))
f.write("\n")
f.write(render.render_template('templates/ledger', date))
-subprocess.check_call(["git", "commit", "ledger",
- "-m", "Update for %s" % (date,)])
+if not dry_run:
+ subprocess.check_call(["git", "commit", "ledger",
+ "-m", "Update for %s" % (date,)])
debts = render.get_debts()
punt = []
debts = render.get_debts()
punt = []
@@
-82,3
+83,7
@@
if punt:
subprocess.check_call(["git", "commit", "ledger", "bloggers.yml",
"-m", "Punts for %s" % (today,)])
subprocess.check_call(["git", "commit", "ledger", "bloggers.yml",
"-m", "Punts for %s" % (today,)])
+
+# if it's a dry run, lets set the ledger back to the beginning state
+if dry_run:
+ subprocess.check_call(["git", "checkout", "ledger"])
Benjamin Mako Hill
||
Want to submit a patch?