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:
22 f.write(render.render_template('templates/ledger', sys.argv[1]))
24 text = render.render_template('templates/week.tmpl', sys.argv[1])
26 lines = text.split("\n")
28 body = "\n".join(lines[1:])
30 page = dict(title = title,
33 x.metaWeblog.newPost(BLOG_ID, USER, passwd, page, True)
35 p = subprocess.Popen(['mutt', '-H', '/dev/stdin'],
36 stdin=subprocess.PIPE)
37 p.communicate(render.render_template('templates/email.txt', sys.argv[1]))