21980a1d6f12a6ba9492e6c1fa501ce823d85c89
[iron-blogger] / update-participants.py
1 #!/usr/bin/python
2
3 import render
4 import os
5 import sys
6 import xmlrpclib
7 import subprocess
8
9
10 XMLRPC_ENDPOINT = 'http://iron-blogger.mit.edu/xmlrpc.php'
11 USER            = 'nelhage'
12 BLOG_ID         = 1
13 PAGE_ID         = 16
14
15 try:
16     subprocess.call(['stty', '-echo'])
17     passwd = raw_input("Password for %s: " % (USER,))
18     print
19 finally:
20     subprocess.call(['stty', 'echo'])
21
22 x = xmlrpclib.ServerProxy(XMLRPC_ENDPOINT)
23 page = x.wp.getPage(BLOG_ID, PAGE_ID, USER, passwd)
24
25 text = render.render_template('templates/users.tmpl')
26 page['description'] = text
27
28 x.wp.editPage(BLOG_ID, PAGE_ID, USER, passwd, page, True)

Benjamin Mako Hill || Want to submit a patch?