#!/usr/bin/python import sys import xmlrpclib wikilocation = sys.argv[1] wikicontent = sys.stdin.read() if not wikilocation.startswith("mcermak/"): print "wiki location must start with mcermak/" sys.exit(1) user = 'xmlrpc2' password = 'fo0m4nchU+' url='http://wiki.test.redhat.com/' wiki = xmlrpclib.ServerProxy(url + '?action=xmlrpc2', allow_none=False) auth_token = wiki.getAuthToken(user, password) mc = xmlrpclib.MultiCall(wiki) mc.applyAuthToken(auth_token) mc.putPage(wikilocation, wikicontent) result = mc()