iron-blogger/update-participants.py

19 lines
526 B
Python
Raw Normal View History

2019-03-08 12:43:50 +00:00
#!/usr/bin/python3
import render
import os
import sys
2019-03-08 12:43:50 +00:00
import xmlrpc.client
import subprocess
import settings
config=settings.load_settings()
2019-03-08 12:43:50 +00:00
x = xmlrpc.client.ServerProxy(config['xmlrpc_endpoint'])
2012-09-29 18:55:49 +00:00
page = x.wp.getPage(config['blog_id'], config['participants_page_id'], config['username'], config['password'])
2019-06-02 20:24:58 +00:00
text = render.render_template('templates/users.tmpl').decode("utf-8")
page['description'] = text
2012-09-29 18:55:49 +00:00
x.wp.editPage(config['blog_id'], config['participants_page_id'], config['username'], config['password'],page,True)