iron-blogger/update-participants.py

19 lines
526 B
Python
Executable file

#!/usr/bin/python3
import render
import os
import sys
import xmlrpc.client
import subprocess
import settings
config=settings.load_settings()
x = xmlrpc.client.ServerProxy(config['xmlrpc_endpoint'])
page = x.wp.getPage(config['blog_id'], config['participants_page_id'], config['username'], config['password'])
text = render.render_template('templates/users.tmpl').decode("utf-8")
page['description'] = text
x.wp.editPage(config['blog_id'], config['participants_page_id'], config['username'], config['password'],page,True)