Remove afarrell and kyoki as punting.
[iron-blogger] / weekly-update.py
1 #!/usr/bin/python
2 import render
3 import os
4 import sys
5 import xmlrpclib
6 import subprocess
7
8 XMLRPC_ENDPOINT = 'http://iron-blogger.mit.edu/xmlrpc.php'
9 USER            = 'nelhage'
10 BLOG_ID         = 1
11
12 try:
13     subprocess.call(['stty', '-echo'])
14     passwd = raw_input("Password for %s: " % (USER,))
15     print
16 finally:
17     subprocess.call(['stty', 'echo'])
18
19 x = xmlrpclib.ServerProxy(XMLRPC_ENDPOINT)
20
21 text = render.render_template('templates/week.tmpl', sys.argv[1])
22
23 lines = text.split("\n")
24 title = lines[0]
25 body  = "\n".join(lines[1:])
26
27 page = dict(title = title,
28             description = body)
29
30 x.metaWeblog.newPost(BLOG_ID, USER, passwd, page, True)

Benjamin Mako Hill || Want to submit a patch?