comparison MoinMoin/i18n/tools/wiki2po.py @ 4039:532865ba8334

update i18n scripts to access master18 wiki
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 30 Aug 2008 21:13:44 +0200
parents 30a254da9eba
children aa929a72715d
comparison
equal deleted inserted replaced
4038:5467ef800d48 4039:532865ba8334
1 #!/usr/bin/python 1 #!/usr/bin/python
2 """ 2 """
3 get latest translation page content from the wiki and write it to *.po 3 get latest translation page content from the wiki and write it to *.po
4 """ 4 """
5
6 master_url = "http://master18.moinmo.in/?action=xmlrpc2"
7
5 DOMAIN = "MoinMoin" 8 DOMAIN = "MoinMoin"
6 9
7 def run(): 10 def run():
8 import sys, xmlrpclib 11 import sys, xmlrpclib
9 sys.path.insert(0, '../..') 12 sys.path.insert(0, '../..')
11 excluded = ["en", ] # languages managed in repository, not in wiki 14 excluded = ["en", ] # languages managed in repository, not in wiki
12 15
13 lang = sys.argv[1] 16 lang = sys.argv[1]
14 17
15 if not lang in excluded: 18 if not lang in excluded:
16 wiki = xmlrpclib.ServerProxy("http://master17.moinmo.in/?action=xmlrpc2") 19 wiki = xmlrpclib.ServerProxy(master_url)
17 20
18 pagename = "MoinI18n/%s" % lang 21 pagename = "MoinI18n/%s" % lang
19 print pagename 22 print pagename
20 pagedata = wiki.getPage(pagename).encode('utf-8').replace("\n", "\r\n") 23 pagedata = wiki.getPage(pagename).encode('utf-8').replace("\n", "\r\n")
21 24