8 XMLRPC_ENDPOINT = 'http://iron-blogger.mit.edu/xmlrpc.php'
20 subprocess.call(['stty', '-echo'])
21 passwd = raw_input("Password for %s: " % (USER,))
24 subprocess.call(['stty', 'echo'])
26 with open('ledger', 'a') as f:
28 f.write(render.render_template('templates/ledger', date))
30 subprocess.check_call(["git", "commit", "ledger",
31 "-m", "Update for %s" % (date,)])
33 text = render.render_template('templates/week.tmpl', date)
35 lines = text.split("\n")
37 body = "\n".join(lines[1:])
39 page = dict(title = title,
43 x = xmlrpclib.ServerProxy(XMLRPC_ENDPOINT)
44 x.metaWeblog.newPost(BLOG_ID, USER, passwd, page, True)
46 email = render.render_template('templates/email.txt', date)
51 p = subprocess.Popen(['mutt', '-H', '/dev/stdin'],
52 stdin=subprocess.PIPE)