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