iron-blogger/update-participants.py

25 lines
646 B
Python
Raw Normal View History

#!/usr/bin/python
import render
import os
import sys
import xmlrpclib
import subprocess
import settings
config=settings.load_settings()
try:
subprocess.call(['stty', '-echo'])
passwd = raw_input("Password for %s: " % (config['username'],))
print
finally:
subprocess.call(['stty', 'echo'])
x = xmlrpclib.ServerProxy(config['xmlrpc_endpoint'])
page = x.wp.getPage(config['blog_id'], config['participants_page_id'], config['username'], passwd)
2009-12-30 06:26:54 +00:00
text = render.render_template('templates/users.tmpl')
page['description'] = text
x.wp.editPage(config['blog_id'], config['participants_page_id'], config['username'], passwd,page,True)