~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to MoinMoin/i18n/tools/po2wiki.py

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
    prepend some processing instructions to a .po file to be able to put it
5
5
    onto moinmaster wiki, letting it get processed by gettext parser
6
6
"""
7
 
 
8
 
master_url = "http://master19.moinmo.in/?action=xmlrpc2"
9
 
user = "ThomasWaldmann" # must be a known Wiki account
10
 
 
11
 
import sys, os
12
 
import xmlrpclib
13
 
 
14
 
password = os.environ.get("PASS", "")
15
 
sys.path.insert(0, '../..')
16
 
 
17
7
def run():
 
8
    import sys, os, xmlrpclib
 
9
    sys.path.insert(0, '../..')
 
10
 
18
11
    excluded = ["en", ] # languages managed in repository, not in wiki
19
12
 
20
13
    lang = sys.argv[1]
47
40
%s""" % (lang, lang, data)
48
41
 
49
42
 
 
43
    user = "ThomasWaldmann" # must be a known Wiki account
 
44
    password = os.environ.get("PASS", "")
50
45
    pagename = "MoinI18n/%s" % lang
51
46
    pagedata = data.encode('utf-8')
52
47
 
53
 
    wiki = xmlrpclib.ServerProxy(master_url)
 
48
    wiki = xmlrpclib.ServerProxy("http://master17.moinmo.in/?action=xmlrpc2")
54
49
    token = wiki.getAuthToken(user, password)
55
50
    mc = xmlrpclib.MultiCall(wiki)
56
51
    mc.applyAuthToken(token)