8 XMLRPC_ENDPOINT = 'http://iron-blogger.mit.edu/xmlrpc.php'
13 subprocess.call(['stty', '-echo'])
14 passwd = raw_input("Password for %s: " % (USER,))
17 subprocess.call(['stty', 'echo'])
19 x = xmlrpclib.ServerProxy(XMLRPC_ENDPOINT)
21 with open('ledger', 'a') as f:
23 f.write(render.render_template('templates/ledger', sys.argv[1]))
25 subprocess.check_call(["git", "commit", "ledger",
26 "-m", "Update for %s" % (sys.argv[1],)])
28 text = render.render_template('templates/week.tmpl', sys.argv[1])
30 lines = text.split("\n")
32 body = "\n".join(lines[1:])
34 page = dict(title = title,
37 x.metaWeblog.newPost(BLOG_ID, USER, passwd, page, True)
39 p = subprocess.Popen(['mutt', '-H', '/dev/stdin'],
40 stdin=subprocess.PIPE)
41 p.communicate(render.render_template('templates/email.txt', sys.argv[1]))