lists.wikimedia.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
List overview
Download
Pywikipedia-svn
June 2013
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
pywikipedia-svn@lists.wikimedia.org
8 participants
103 discussions
Start a n
N
ew thread
SVN: [11614] branches/rewrite/pywikibot/data/api.py
by legoktm@svn.wikimedia.org
02 Jun '13
02 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11614
Revision: 11614 Author: legoktm Date: 2013-06-02 12:06:55 +0000 (Sun, 02 Jun 2013) Log Message: ----------- Try to use cPickle if possible for a speedboost Modified Paths: -------------- branches/rewrite/pywikibot/data/api.py Modified: branches/rewrite/pywikibot/data/api.py =================================================================== --- branches/rewrite/pywikibot/data/api.py 2013-06-02 12:02:35 UTC (rev 11613) +++ branches/rewrite/pywikibot/data/api.py 2013-06-02 12:06:55 UTC (rev 11614) @@ -19,7 +19,10 @@ import logging import mimetypes import os -import pickle +try: + import cPickle as pickle +except ImportError: + import pickle import pprint import re import traceback
1
0
0
0
SVN: [11613] branches/rewrite/tests/api_tests.py
by legoktm@svn.wikimedia.org
02 Jun '13
02 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11613
Revision: 11613 Author: legoktm Date: 2013-06-02 12:02:35 +0000 (Sun, 02 Jun 2013) Log Message: ----------- Add a unit test that verifies the cached data is read correctly Modified Paths: -------------- branches/rewrite/tests/api_tests.py Modified: branches/rewrite/tests/api_tests.py =================================================================== --- branches/rewrite/tests/api_tests.py 2013-06-02 11:40:03 UTC (rev 11612) +++ branches/rewrite/tests/api_tests.py 2013-06-02 12:02:35 UTC (rev 11613) @@ -6,6 +6,7 @@ # __version__ = '$Id$' +import datetime import unittest import pywikibot import pywikibot.data.api as api @@ -71,6 +72,22 @@ self.assert_(page.title() in titles) +class TestCachedRequest(unittest.TestCase): + def testResults(self): + # Run the cached query twice to ensure the + # data returned is equal + params = {'action': 'query', + 'prop': 'info', + 'titles': 'Main Page', + } + req = api.CachedRequest(datetime.timedelta(minutes=10), + site=mysite, **params) + data = req.submit() + req2 = api.CachedRequest(datetime.timedelta(minutes=10), + site=mysite, **params) + data2 = req2.submit() + self.assertEqual(data, data2) + if __name__ == '__main__': try: unittest.main()
1
0
0
0
SVN: [11612] trunk/pywikipedia/userlib.py
by xqt@svn.wikimedia.org
02 Jun '13
02 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11612
Revision: 11612 Author: xqt Date: 2013-06-02 11:40:03 +0000 (Sun, 02 Jun 2013) Log Message: ----------- fix for last commit Modified Paths: -------------- trunk/pywikipedia/userlib.py Modified: trunk/pywikipedia/userlib.py =================================================================== --- trunk/pywikipedia/userlib.py 2013-06-02 11:37:43 UTC (rev 11611) +++ trunk/pywikipedia/userlib.py 2013-06-02 11:40:03 UTC (rev 11612) @@ -539,7 +539,7 @@ def _getBlockID(self): pywikibot.output(u"Getting block id for [[User:%s]]..." % self.name()) if self.isAnonymous(): - usertype = ip" + usertype = "ip" else: usertype = "users" if not self.site().has_api() or self.site().versionnumber() < 12:
1
0
0
0
SVN: [11611] trunk/pywikipedia/userlib.py
by xqt@svn.wikimedia.org
02 Jun '13
02 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11611
Revision: 11611 Author: xqt Date: 2013-06-02 11:37:43 +0000 (Sun, 02 Jun 2013) Log Message: ----------- normalize username, new method exists(), some PEP8 changes Modified Paths: -------------- trunk/pywikipedia/userlib.py Modified: trunk/pywikipedia/userlib.py =================================================================== --- trunk/pywikipedia/userlib.py 2013-06-02 09:17:57 UTC (rev 11610) +++ trunk/pywikipedia/userlib.py 2013-06-02 11:37:43 UTC (rev 11611) @@ -3,7 +3,7 @@ Library to work with users, their pages and talk pages. """ # -# (C) Pywikipedia bot team, 2008-2012 +# (C) Pywikipedia bot team, 2008-2013 # # Distributed under the terms of the MIT license. # @@ -11,7 +11,8 @@ import re import wikipedia as pywikibot -import query, config +import config +import query class AutoblockUser(pywikibot.Error): @@ -20,6 +21,7 @@ an action is requested on a virtual autoblock user that's not available for him (i.e. roughly everything except unblock). """ + pass class UserActionRefuse(pywikibot.Error): pass @@ -82,6 +84,7 @@ self._name = name else: self._name = name[0].upper() + name[1:] + self._name = self._name.replace('_', ' ') # None means not loaded self._blocked = None self._groups = None @@ -89,7 +92,6 @@ #if self.site().versionnumber() >= 16: # self._urToken = None - def site(self): return self._site @@ -115,6 +117,9 @@ def isAnonymous(self): return ip_regexp.match(self.username.split("/")[0]) is not None + def exists(self): + return self.isAnonymous() or self.isRegistered() + def __str__(self): return (u'%s:%s' % (self.site(), self.name())).encode(config.console_encoding, @@ -125,7 +130,6 @@ def _load(self): getall(self.site(), [self], force=True) - return def registrationTime(self, force=False): if self._registrationTime < 0 or force: @@ -185,10 +189,12 @@ if self._isAutoblock: #This user is probably being queried for purpose of lifting #an autoblock, so has no user pages per se. - raise AutoblockUser("This is an autoblock ID, you can only use to unblock it.") + raise AutoblockUser( + u"This is an autoblock ID, you can only use to unblock it.") if subpage: subpage = u'/' + subpage - return pywikibot.Page(self.site(), self.name() + subpage, defaultNamespace=2) + return pywikibot.Page(self.site(), self.name() + subpage, + defaultNamespace=2) def getUserTalkPage(self, subpage=u''): """ Return a pywikibot.Page object corresponding to this user's main @@ -201,7 +207,8 @@ if self._isAutoblock: #This user is probably being queried for purpose of lifting #an autoblock, so has no user talk pages per se. - raise AutoblockUser("This is an autoblock ID, you can only use to unblock it.") + raise AutoblockUser( + u"This is an autoblock ID, you can only use to unblock it.") if subpage: subpage = u'/' + subpage return pywikibot.Page(self.site(), self.name() + subpage, @@ -251,19 +258,19 @@ return True return False - def sendMailOld(self, subject = u'', text = u'', ccMe = False): + def sendMailOld(self, subject=u'', text=u'', ccMe=False): address = self.site().put_address('Special:EmailUser') predata = { - "wpSubject" : subject, - "wpText" : text, - 'wpSend' : "Send", - 'wpCCMe' : '0', + "wpSubject": subject, + "wpText": text, + 'wpSend': "Send", + 'wpCCMe': '0', } if ccMe: predata['wpCCMe'] = '1' predata['wpEditToken'] = self.site().getToken() - response, data = self.site().postForm(address, predata, sysop = False) + response, data = self.site().postForm(address, predata, sysop=False) if data: if 'var wgAction = "success";' in data: pywikibot.output(u'Email sent.') @@ -275,7 +282,6 @@ pywikibot.output(u'No data found.') return False - @pywikibot.deprecated('contributions()') def editedPages(self, limit=500): """ Deprecated function that wraps 'contributions' for backwards @@ -307,7 +313,7 @@ 'action': 'query', 'list': 'usercontribs', 'ucuser': self.name(), - 'ucprop': ['ids','title','timestamp','comment'],# 'size','flags'], + 'ucprop': ['ids', 'title', 'timestamp', 'comment'], # 'size','flags'], 'uclimit': limit, 'ucdir': 'older', } @@ -331,8 +337,7 @@ ts = pywikibot.parsetime2stamp(contrib['timestamp']) yield (pywikibot.Page(self.site(), contrib['title'], defaultNamespace=contrib['ns']), - contrib['revid'], ts, contrib.get('comment', None) - ) + contrib['revid'], ts, contrib.get('comment', None)) nbresults += 1 if nbresults >= limit: break @@ -358,15 +363,21 @@ yield c return - for item in self.site().logpages(number, mode='upload', user=self.username, dump=True): - yield pywikibot.ImagePage(self.site(), item['title']), item['timestamp'], item['comment'], item['pageid'] > 0 + for item in self.site().logpages(number, mode='upload', + user=self.username, dump=True): + yield pywikibot.ImagePage(self.site(), item['title']), \ + item['timestamp'], item['comment'], item['pageid'] > 0 return - def _uploadedImagesOld(self, number = 10): + def _uploadedImagesOld(self, number=10): """Yield ImagePages from Special:Log&type=upload""" - regexp = re.compile('<li[^>]*>(?P<date>.+?)\s+<a href=.*?>(?P<user>.+?)</a> .* uploaded "<a href=".*?"(?P<new> class="new")? title="(Image|File):(?P<image>.+?)"\s*>(?:.*?<span class="comment">(?P<comment>.*?)</span>)?', re.UNICODE) - path = self.site().log_address(number, mode = 'upload', user = self.name()) + regexp = re.compile( + '<li[^>]*>(?P<date>.+?)\s+<a href=.*?>(?P<user>.+?)</a> ' + '.* uploaded "<a href=".*?"(?P<new> class="new")? ' + 'title="(Image|File):(?P<image>.+?)"\s*>' + '(?:.*?<span class="comment">(?P<comment>.*?)</span>)?', re.UNICODE) + path = self.site().log_address(number, mode='upload', user=self.name()) html = self.site().getUrl(path) redlink_key = self.site().mediawiki_message('red-link-title') redlink_tail_len = None @@ -382,11 +393,12 @@ date = m.group('date') comment = m.group('comment') or '' - yield pywikibot.ImagePage(self.site(), image), date, comment, deleted + yield pywikibot.ImagePage(self.site(), + image), date, comment, deleted def block(self, expiry=None, reason=None, anon=True, noCreate=False, - onAutoblock=False, banMail=False, watchUser=False, allowUsertalk=True, - reBlock=False, hidename=False): + onAutoblock=False, banMail=False, watchUser=False, + allowUsertalk=True, reBlock=False, hidename=False): """ Block the user by API. @@ -418,7 +430,8 @@ if not self.site().isAllowed('block', sysop=True): raise UserActionRefuse('You don\'t have permission to block') if not expiry: - expiry = pywikibot.input(u'Please enter the expiry time for the block:') + expiry = pywikibot.input( + u'Please enter the expiry time for the block:') if not reason: reason = pywikibot.input(u'Please enter a reason for the block:') @@ -429,7 +442,7 @@ params = { 'action': 'block', 'user': self.name(), - 'token': self.site().getToken(self, sysop = True), + 'token': self.site().getToken(self, sysop=True), 'reason': reason, } if expiry: @@ -450,14 +463,14 @@ params['reblock'] = 1 data = query.GetData(params, self.site(), sysop=True) - if 'error' in data: #error occured + if 'error' in data: # error occured errCode = data['error']['code'] if errCode == 'alreadyblocked': raise AlreadyBlocked() elif errCode == 'blockedasrange': raise AlreadyBlocked("Range Blocked") - #elif errCode == 'invalidrange': - # pass +## elif errCode == 'invalidrange': +## pass elif errCode == 'invalidexpiry': raise BlockError("Invaild expiry") elif errCode == 'pastexpiry ': @@ -465,24 +478,24 @@ elif errCode == 'cantblock-email': raise BlockError("You don't have permission to ban mail") - elif 'block' in data: #success - return True + elif 'block' in data: # success + return True else: pywikibot.output("Unknown Error, result: %s" % data) raise BlockError raise False - def _blockOld(self, expiry, reason, anonOnly, noSignup, enableAutoblock, emailBan, - watchUser, allowUsertalk): + def _blockOld(self, expiry, reason, anonOnly, noSignup, enableAutoblock, + emailBan, watchUser, allowUsertalk): """ Internal use to block the user by web page. Don't use this function directly. """ - token = self.site().getToken(self, sysop = True) + token = self.site().getToken(self, sysop=True) pywikibot.output(u"Blocking [[User:%s]]..." % self.name()) - boolStr = ['0','1'] + boolStr = ['0', '1'] predata = { 'wpBlockAddress': self.name(), 'wpBlockOther': expiry, @@ -498,13 +511,15 @@ } address = self.site().block_address() - response, data = self.site().postForm(address, predata, sysop = True) + response, data = self.site().postForm(address, predata, sysop=True) if data: - if self.site().mediawiki_message('ipb_already_blocked').replace('$1', self.name()) in data: + if self.site().mediawiki_message( + 'ipb_already_blocked').replace('$1', self.name()) in data: raise AlreadyBlockedError raise BlockError return True + def unblock(self, reason=None): """ Unblock the user. @@ -519,38 +534,41 @@ blockID = self._getBlockID() if not self.site().has_api() or self.site().versionnumber() < 12: return self._unblockOld(blockID, reason) - self._unblock(blockID,reason) + self._unblock(blockID, reason) def _getBlockID(self): pywikibot.output(u"Getting block id for [[User:%s]]..." % self.name()) if self.isAnonymous(): - usertype="ip" + usertype = ip" else: - usertype="users" + usertype = "users" if not self.site().has_api() or self.site().versionnumber() < 12: return getBlockIDOld() - data = self.site().blocksearch_address(self.name(),usertype) + data = self.site().blocksearch_address(self.name(), usertype) try: bIDre = data[1]["query"]["blocks"][0]["id"] except IndexError: pywikibot.output(data) raise BlockIDError return bIDre + def _unblock(self, blockID, reason): pywikibot.output(u"Unblocking [[User:%s]]..." % self.name()) params = { - 'action':'unblock', - 'reason':reason, + 'action': 'unblock', + 'reason': reason, 'id': blockID, - 'token': self.site().getToken(self, sysop = True), + 'token': self.site().getToken(self, sysop=True), } - data = query.GetData(params, self.site(), back_response=True,sysop=True) + data = query.GetData(params, self.site(), back_response=True, + sysop=True) if 'error' in data: pywikibot.output("Error happend: %s" % str(data['error'])) return True + def _unblockOld(self, blockID, reason): pywikibot.output(u"Unblocking [[User:%s]]..." % self.name()) - token = self.site().getToken(self, sysop = True) + token = self.site().getToken(self, sysop=True) predata = { 'id': blockID, 'wpUnblockReason': reason, @@ -558,12 +576,14 @@ 'wpEditToken': token, } address = self.site().unblock_address() - response, data = self.site().postForm(address, predata, sysop = True) + response, data = self.site().postForm(address, predata, sysop=True) if response.code != 302: - if self.site().mediawiki_message('ipb_cant_unblock').replace('$1',blockID) in data: + if self.site().mediawiki_message( + 'ipb_cant_unblock').replace('$1', blockID) in data: raise AlreadyUnblockedError raise UnblockError, data return True + def getBlockIDOld(self): self.family.blocksearch_address(self.lang, s) address = self.site().blocksearch_address(self.name()) @@ -573,6 +593,8 @@ pywikibot.output(data) raise BlockIDError return bIDre.group(1) + + def getall(site, users, throttle=True, force=False): """Bulk-retrieve users data from site @@ -585,9 +607,9 @@ pywikibot.output(u'Getting %d users data from %s...' % (len(users), site)) - if len(users) > 250: # max load prevents HTTPError 400 + if len(users) > 250: # max load prevents HTTPError 400 for urg in range(0, len(users), 250): - if urg == range(0, len(users), 250)[-1]: #latest + if urg == range(0, len(users), 250)[-1]: # latest k = users[urg:] _GetAllUI(site, k, throttle, force).run() users[urg:] = k @@ -600,6 +622,7 @@ class _GetAllUI(object): + def __init__(self, site, users, throttle, force): self.site = site self.users = [] @@ -636,7 +659,8 @@ else: uj._groups = [] if x['registration']: - uj._registrationTime = pywikibot.parsetime2stamp(x['registration']) + uj._registrationTime = pywikibot.parsetime2stamp( + x['registration']) else: uj._registrationTime = 0 uj._mailable = ("emailable" in x) @@ -648,13 +672,16 @@ params = { 'action': 'query', 'list': 'users', - 'usprop': ['blockinfo', 'groups', 'editcount', 'registration', 'emailable', 'gender'], + 'usprop': ['blockinfo', 'groups', 'editcount', 'registration', + 'emailable', 'gender'], 'ususers': u'|'.join([n.name() for n in self.users]), } data = query.GetData(params, self.site) for user in data['query']['users']: if u'invalid' in user: - raise InvalidUser("User name '%s' is invalid. IP addresses are not supported." % user['name']) + raise InvalidUser( + "User name '%s' is invalid. IP addresses are not supported." + % user['name']) users[user['name']] = user return users
1
0
0
0
SVN: [11610] trunk/pywikipedia/category_redirect.py
by xqt@svn.wikimedia.org
02 Jun '13
02 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11610
Revision: 11610 Author: xqt Date: 2013-06-02 09:17:57 +0000 (Sun, 02 Jun 2013) Log Message: ----------- revert r10485, some PEP8 changes Modified Paths: -------------- trunk/pywikipedia/category_redirect.py Modified: trunk/pywikipedia/category_redirect.py =================================================================== --- trunk/pywikipedia/category_redirect.py 2013-06-02 08:33:00 UTC (rev 11609) +++ trunk/pywikipedia/category_redirect.py 2013-06-02 09:17:57 UTC (rev 11610) @@ -14,7 +14,7 @@ """ # -# (C) Pywikipedia team, 2008-2012 +# (C) Pywikipedia team, 2008-2013 # __version__ = '$Id$' # @@ -24,12 +24,14 @@ import cPickle import math import re -import sys, traceback +import sys import time +import traceback from datetime import datetime, timedelta import wikipedia as pywikibot import pagegenerators -import catlib, query +import catlib +import query from pywikibot import i18n @@ -46,17 +48,16 @@ class CategoryRedirectBot(object): def __init__(self): - self.cooldown = 7 # days + self.cooldown = 7 # days self.site = pywikibot.getSite() self.catprefix = self.site.namespace(14)+":" self.log_text = [] self.edit_requests = [] self.log_page = pywikibot.Page(self.site, - u"User:%(user)s/category redirect log" % - {'user': self.site.loggedInAs()}) + u"User:%(user)s/category redirect log" + % {'user': self.site.loggedInAs()}) # Localization: - # Category that contains all redirected category pages self.cat_redirect_cat = { 'wikipedia': { @@ -86,12 +87,9 @@ self.dbl_redir_comment = 'category_redirect-fix-double' self.maint_comment = 'category_redirect-comment' self.edit_request_text = i18n.twtranslate( - self.site.lang, - 'category_redirect-edit-request') + \ - u'\n~~~~' + self.site.lang, 'category_redirect-edit-request') + u'\n~~~~' self.edit_request_item = i18n.twtranslate( - self.site.lang, - 'category_redirect-edit-request-item') + self.site.lang, 'category_redirect-edit-request-item') def change_category(self, article, oldCat, newCat, comment=None, sortKey=None): @@ -132,11 +130,11 @@ except pywikibot.SpamfilterError, error: pywikibot.output( u'Changing page %s blocked by spam filter (URL=%s)' - % (article.title(asLink=True), error.url)) + % (article.title(asLink=True), error.url)) except pywikibot.NoUsername: pywikibot.output( u"Page %s not saved; sysop privileges required." - % article.title(asLink=True)) + % article.title(asLink=True)) self.edit_requests.append({ 'title': article.title(asLink=True, textlink=True), 'oldcat': oldCat.title(asLink=True, textlink=True), @@ -169,7 +167,8 @@ article = pywikibot.Page(self.site, item['title']) changed = self.change_category(article, oldCat, newCat, comment=comment) - if changed: moved += 1 + if changed: + moved += 1 # pass 2: look for template doc pages for result in self.query_results(list="categorymembers", @@ -185,7 +184,8 @@ continue changed = self.change_category(doc, oldCat, newCat, comment=comment) - if changed: moved += 1 + if changed: + moved += 1 if found: pywikibot.output(u"%s: %s found, %s moved" @@ -202,7 +202,7 @@ def readyToEdit(self, cat): """Return True if cat not edited during cooldown period, else False.""" - dateformat ="%Y%m%d%H%M%S" + dateformat = "%Y%m%d%H%M%S" today = datetime.now() deadline = today + timedelta(days=-self.cooldown) if cat.editTime() is None: @@ -216,8 +216,7 @@ querydata = query.CombineParams(querydata, data) if not "action" in querydata or not querydata['action'] == 'query': raise ValueError( - "query_results: 'action' set to value other than 'query'" - ) + "query_results: 'action' set to value other than 'query'") waited = 0 while True: try: @@ -244,8 +243,7 @@ waited += 5 if waited % 30 == 0: pywikibot.output( - u"(Waited %i seconds due to server lag.)" - % waited) + u"(Waited %i seconds due to server lag.)" % waited) continue else: raise APIError(result['error']) @@ -263,6 +261,11 @@ assert len(result['query-continue'].keys()) == 1, \ "More than one query-continue key returned: %s" \ % result['query-continue'].keys() + query_type = result['query-continue'].keys()[0] + assert (query_type in querydata.keys() + or query_type in querydata.values()), \ + "Site returned unknown query-continue type '%s'" \ + % query_type querydata.update(result['query-continue'][query_type]) else: return @@ -295,9 +298,9 @@ # get the id of the newest log being archived rotate_revid = history[-1][0] # append permalink - log_text = log_text + ( - "\n\n'''[%s Older logs]'''" - % self.log_page.permalink(oldid=rotate_revid)) + log_text = log_text + \ + "\n\n'''[%s Older logs]'''" \ + % self.log_page.permalink(oldid=rotate_revid) except IndexError: # don't die if getVersionHistory fails (again) return all_log_text @@ -314,10 +317,12 @@ l = time.localtime() today = "%04d-%02d-%02d" % l[:3] - edit_request_page = pywikibot.Page(self.site, - u"User:%(user)s/category edit requests" % locals()) - datafile = pywikibot.config.datafilepath( - "%s-catmovebot-data" % self.site.dbName()) + edit_request_page = pywikibot.Page( + self.site, + u"User:%(user)s/category edit requests" + % locals()) + datafile = pywikibot.config.datafilepath("%s-catmovebot-data" + % self.site.dbName()) try: inp = open(datafile, "rb") record = cPickle.load(inp) @@ -328,10 +333,11 @@ cPickle.dump(record, open(datafile + ".bak", "wb")) try: - template_list = self.site.family.category_redirect_templates[self.site.lang] + template_list = self.site.family.category_redirect_templates[ + self.site.lang] except KeyError: pywikibot.output(u"No redirect templates defined for %s" - % self.site.sitename()) + % self.site.sitename()) return # regex to match soft category redirects # note that any templates containing optional "category:" are @@ -346,13 +352,13 @@ 'template': "|".join(item.replace(" ", "[ _]+") for item in template_list), 'catns': self.site.namespace(14)}, - re.I|re.X) + re.I | re.X) # check for hard-redirected categories that are not already marked # with an appropriate template comment = i18n.twtranslate(self.site.lang, self.redir_comment) for result in self.query_results(list='allpages', - apnamespace='14', # Category: + apnamespace='14', # Category: apfrom='!', apfilterredir='redirects', aplimit='max'): @@ -372,20 +378,19 @@ try: page.put(newtext, comment, minorEdit=True) self.log_text.append(u"* Added {{tl|%s}} to %s" - % (template_list[0], - page.title(asLink=True, - textlink=True))) + % (template_list[0], + page.title(asLink=True, + textlink=True))) except pywikibot.Error, e: self.log_text.append( u"* Failed to add {{tl|%s}} to %s (%s)" - % (template_list[0], - page.title(asLink=True, textlink=True), - e)) + % (template_list[0], + page.title(asLink=True, textlink=True), e)) else: problems.append( u"# %s is a hard redirect to %s" - % (page.title(asLink=True, textlink=True), - target.title(asLink=True, textlink=True))) + % (page.title(asLink=True, textlink=True), + target.title(asLink=True, textlink=True))) pywikibot.output("Done checking hard-redirect category pages.") @@ -404,7 +409,7 @@ # get a list of all members of the category-redirect category for result in self.query_results(generator=u'categorymembers', gcmtitle=target, - gcmnamespace=u'14', # CATEGORY + gcmnamespace=u'14', # CATEGORY gcmlimit=u'max', prop='info|categoryinfo'): for catdata in result['pages'].values(): @@ -423,17 +428,17 @@ cat_title = cat.title(withNamespace=False) if "category redirect" in cat_title: self.log_text.append(u"* Ignoring %s" - % cat.title(asLink=True, textlink=True)) + % cat.title(asLink=True, textlink=True)) continue try: text = cat.get(get_redirect=True) except pywikibot.Error: self.log_text.append(u"* Could not load %s; ignoring" - % cat.title(asLink=True, textlink=True)) + % cat.title(asLink=True, textlink=True)) continue if not cat.isCategoryRedirect(): self.log_text.append(u"* False positive: %s" - % cat.title(asLink=True, textlink=True)) + % cat.title(asLink=True, textlink=True)) continue if cat_title not in record: # make sure every redirect has a record entry @@ -486,24 +491,25 @@ while newcat in catlist: if newcat == d or newcat == dest: self.log_text.append(u"* Redirect loop from %s" - % newcat.title(asLink=True, - textlink=True)) + % newcat.title(asLink=True, + textlink=True)) break newcat = catlib.Category(self.site, self.catprefix+catmap[newcat]) else: self.log_text.append( u"* Fixed double-redirect: %s -> %s -> %s" - % (d.title(asLink=True, textlink=True), - dest.title(asLink=True, textlink=True), - newcat.title(asLink=True, textlink=True))) + % (d.title(asLink=True, textlink=True), + dest.title(asLink=True, textlink=True), + newcat.title(asLink=True, textlink=True))) oldtext = d.get(get_redirect=True) # remove the old redirect from the old text, # leaving behind any non-redirect text oldtext = template_regex.sub("", oldtext) newtext = (u"{{%(redirtemp)s|%(ncat)s}}" - % {'redirtemp': template_list[0], - 'ncat': newcat.title(withNamespace=False)}) + % {'redirtemp': template_list[0], + 'ncat': newcat.title( + withNamespace=False)}) newtext = newtext + oldtext.strip() try: d.put(newtext, @@ -526,9 +532,8 @@ cat_title = cat.title(withNamespace=False) if not self.readyToEdit(cat): counts[cat_title] = None - self.log_text.append( - u"* Skipping %s; in cooldown period." - % cat.title(asLink=True, textlink=True)) + self.log_text.append(u"* Skipping %s; in cooldown period." + % cat.title(asLink=True, textlink=True)) continue found, moved = self.move_contents(cat_title, catmap[cat], editSummary=comment) @@ -549,18 +554,19 @@ self.maint_comment)) self.log_text.sort() problems.sort() - self.log_page.put(u"\n==%i-%02i-%02iT%02i:%02i:%02iZ==\n" - % time.gmtime()[:6] + self.log_page.put(u"\n== %i-%02i-%02iT%02i:%02i:%02iZ ==\n" + % time.gmtime()[:6] + u"\n".join(self.log_text) + u"\n" + u"\n".join(problems) + u"\n" + self.get_log_text()) if self.edit_requests: edit_request_page.put(self.edit_request_text - % {'itemlist': - u"\n" + u"\n".join( - (self.edit_request_item % item) - for item in self.edit_requests)}) + % {'itemlist': + u"\n" + u"\n".join( + (self.edit_request_item % item) + for item in self.edit_requests)}) + def main(*args): global bot try:
1
0
0
0
SVN: [11609] trunk/pywikipedia/maintenance/update_namespaces.py
by xqt@svn.wikimedia.org
02 Jun '13
02 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11609
Revision: 11609 Author: xqt Date: 2013-06-02 08:33:00 +0000 (Sun, 02 Jun 2013) Log Message: ----------- sort result Modified Paths: -------------- trunk/pywikipedia/maintenance/update_namespaces.py Modified: trunk/pywikipedia/maintenance/update_namespaces.py =================================================================== --- trunk/pywikipedia/maintenance/update_namespaces.py 2013-06-02 08:19:49 UTC (rev 11608) +++ trunk/pywikipedia/maintenance/update_namespaces.py 2013-06-02 08:33:00 UTC (rev 11609) @@ -17,14 +17,14 @@ __version__ = '$Id$' # +import re import sys +from operator import itemgetter + sys.path.insert(1, '..') - import wikipedia from wikipedia import output - import family_check -import re r_namespace_section_main = r'(?s)self\.namespaces\s*\=\s*\{.*\s+%s\s*:\s*\{(.*?)\}' r_namespace_section_sub = r'(?s)self\.namespaces\[%s\]\s*\=\s*\{(.*?)\}' @@ -55,8 +55,9 @@ namespace_defs = {} oncedefs = {} oncetext = '' - for lang, namespaces in changes.iteritems(): - for namespace_id, namespace_list, predefined_namespace in namespaces: + for lang, namespaces in sorted(changes.iteritems()): + for namespace_id, namespace_list, predefined_namespace in \ + sorted(namespaces, key=itemgetter(0)): if namespace_id in skip_namespace: continue msg = u'Setting namespace[%s] for %s to ' \ @@ -71,6 +72,11 @@ ## % (namespace_id, lang), ## family_text) else: + if not family: + if upmain and namespace_id in (828, 829): + r_namespace_section = r_namespace_section_sub + else: + r_namespace_section = r_namespace_section_main namespace_section = re.search(r_namespace_section % namespace_id, family_text) if not namespace_section:
1
0
0
0
SVN: [11608] trunk/pywikipedia/families
by xqt@svn.wikimedia.org
02 Jun '13
02 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11608
Revision: 11608 Author: xqt Date: 2013-06-02 08:19:49 +0000 (Sun, 02 Jun 2013) Log Message: ----------- update language_by_site from rewrite r11607 Modified Paths: -------------- trunk/pywikipedia/families/wikibooks_family.py trunk/pywikipedia/families/wikipedia_family.py trunk/pywikipedia/families/wikiquote_family.py trunk/pywikipedia/families/wikisource_family.py trunk/pywikipedia/families/wikiversity_family.py trunk/pywikipedia/families/wiktionary_family.py Modified: trunk/pywikipedia/families/wikibooks_family.py =================================================================== --- trunk/pywikipedia/families/wikibooks_family.py 2013-06-02 08:19:22 UTC (rev 11607) +++ trunk/pywikipedia/families/wikibooks_family.py 2013-06-02 08:19:49 UTC (rev 11608) @@ -11,12 +11,12 @@ self.name = 'wikibooks' self.languages_by_size = [ - 'en', 'de', 'fr', 'hu', 'ja', 'pt', 'it', 'vi', 'nl', 'pl', 'es', - 'he', 'id', 'sq', 'ca', 'fi', 'ru', 'cs', 'zh', 'sv', 'hr', 'tr', - 'da', 'no', 'th', 'sr', 'gl', 'fa', 'ko', 'ta', 'ar', 'mk', 'tl', - 'ro', 'is', 'tt', 'lt', 'ka', 'az', 'eo', 'uk', 'bg', 'el', 'hy', - 'sk', 'sl', 'si', 'li', 'ms', 'la', 'ang', 'ia', 'cv', 'et', 'ur', - 'mr', 'bn', 'hi', 'ml', 'oc', 'kk', 'km', 'eu', 'fy', 'ie', 'ne', + 'en', 'de', 'fr', 'hu', 'ja', 'pt', 'it', 'nl', 'pl', 'es', 'he', + 'id', 'sq', 'ca', 'fi', 'ru', 'cs', 'zh', 'sv', 'hr', 'tr', 'da', + 'no', 'th', 'sr', 'ko', 'gl', 'fa', 'vi', 'ta', 'ar', 'mk', 'tl', + 'ro', 'is', 'tt', 'lt', 'ka', 'az', 'eo', 'uk', 'sk', 'bg', 'el', + 'hy', 'sl', 'si', 'li', 'ms', 'la', 'ang', 'ia', 'cv', 'et', 'ur', + 'mr', 'bn', 'ml', 'hi', 'oc', 'kk', 'km', 'eu', 'fy', 'ie', 'ne', 'sa', 'te', 'af', 'tg', 'ky', 'bs', 'pa', 'mg', 'be', 'cy', 'zh-min-nan', 'ku', 'uz', ] Modified: trunk/pywikipedia/families/wikipedia_family.py =================================================================== --- trunk/pywikipedia/families/wikipedia_family.py 2013-06-02 08:19:22 UTC (rev 11607) +++ trunk/pywikipedia/families/wikipedia_family.py 2013-06-02 08:19:49 UTC (rev 11608) @@ -17,28 +17,28 @@ 'lt', 'eu', 'bg', 'he', 'hr', 'sl', 'uz', 'vo', 'et', 'hi', 'nn', 'gl', 'simple', 'az', 'la', 'el', 'sh', 'th', 'ka', 'mk', 'oc', 'new', 'pms', 'tl', 'be', 'ta', 'ht', 'te', 'be-x-old', 'cy', 'lv', - 'bs', 'br', 'sq', 'hy', 'mg', 'tt', 'jv', 'mr', 'lb', 'is', 'my', - 'yo', 'ml', 'ba', 'an', 'lmo', 'af', 'fy', 'pnb', 'bn', 'sw', 'bpy', - 'io', 'ky', 'ur', 'ne', 'scn', 'zh-yue', 'gu', 'nds', 'ga', 'ku', + 'bs', 'hy', 'br', 'sq', 'tt', 'jv', 'mg', 'mr', 'lb', 'is', 'my', + 'ml', 'yo', 'ba', 'an', 'lmo', 'af', 'fy', 'pnb', 'bn', 'sw', 'io', + 'bpy', 'ky', 'ur', 'ne', 'scn', 'zh-yue', 'gu', 'nds', 'ga', 'ku', 'ast', 'qu', 'su', 'cv', 'sco', 'als', 'ia', 'nap', 'bug', 'bat-smg', 'kn', 'map-bms', 'wa', 'am', 'ckb', 'gd', 'hif', - 'zh-min-nan', 'tg', 'arz', 'mzn', 'yi', 'vec', 'mn', 'nah', - 'roa-tara', 'sah', 'sa', 'os', 'pam', 'hsb', 'si', 'se', 'bar', - 'li', 'mi', 'co', 'gan', 'fo', 'ilo', 'bo', 'pa', 'glk', 'rue', - 'bcl', 'fiu-vro', 'mrj', 'nds-nl', 'tk', 'ps', 'vls', 'xmf', 'gv', - 'diq', 'min', 'or', 'kv', 'pag', 'zea', 'km', 'dv', 'nrm', 'mhr', - 'rm', 'koi', 'udm', 'csb', 'frr', 'vep', 'lad', 'lij', 'wuu', 'fur', - 'zh-classical', 'ug', 'sc', 'stq', 'ay', 'mt', 'pi', 'so', 'bh', - 'ksh', 'nov', 'ang', 'hak', 'kw', 'nv', 'pcd', 'gn', 'ext', 'frp', - 'as', 'szl', 'gag', 'eml', 'ie', 'ln', 'ace', 'ce', 'krc', 'pfl', + 'zh-min-nan', 'tg', 'arz', 'mzn', 'yi', 'vec', 'mn', 'sah', 'nah', + 'roa-tara', 'sa', 'os', 'pam', 'hsb', 'si', 'bar', 'se', 'li', 'mi', + 'co', 'pa', 'fo', 'ilo', 'gan', 'bo', 'glk', 'rue', 'bcl', + 'fiu-vro', 'mrj', 'nds-nl', 'tk', 'ps', 'vls', 'xmf', 'gv', 'diq', + 'min', 'or', 'kv', 'pag', 'zea', 'km', 'dv', 'nrm', 'mhr', 'rm', + 'koi', 'csb', 'udm', 'frr', 'vep', 'lad', 'lij', 'wuu', 'fur', + 'zh-classical', 'sc', 'ug', 'stq', 'mt', 'ay', 'pi', 'so', 'bh', + 'ksh', 'nov', 'hak', 'ang', 'kw', 'pcd', 'nv', 'gn', 'ext', 'frp', + 'as', 'szl', 'eml', 'ce', 'gag', 'ace', 'ie', 'ln', 'pfl', 'krc', 'xal', 'haw', 'pdc', 'rw', 'crh', 'to', 'dsb', 'kl', 'arc', 'myv', 'kab', 'lez', 'bjn', 'sn', 'pap', 'tpi', 'lbe', 'wo', 'jbo', 'mdf', - 'cbk-zam', 'av', 'kbd', 'srn', 'mwl', 'ty', 'lo', 'ab', 'tet', - 'ltg', 'kg', 'na', 'ig', 'bxr', 'nso', 'za', 'kaa', 'zu', 'chy', - 'rmy', 'roa-rup', 'cu', 'tn', 'chr', 'bi', 'cdo', 'got', 'sm', 'bm', - 'iu', 'pih', 'pnt', 'sd', 'ss', 'ki', 'ee', 'ha', 'om', 'fj', 'ti', - 'ts', 'ks', 've', 'sg', 'rn', 'st', 'dz', 'ak', 'cr', 'tum', 'lg', - 'ik', 'ff', 'ny', 'tw', 'ch', 'xh', + 'cbk-zam', 'mwl', 'av', 'kbd', 'srn', 'ty', 'lo', 'ab', 'kg', 'tet', + 'ltg', 'na', 'ig', 'bxr', 'nso', 'za', 'kaa', 'zu', 'chy', 'rmy', + 'cu', 'tn', 'chr', 'roa-rup', 'bi', 'cdo', 'got', 'sm', 'bm', 'iu', + 'pih', 'pnt', 'sd', 'ss', 'ki', 'ee', 'ha', 'om', 'fj', 'ti', 'ts', + 'ks', 've', 'sg', 'rn', 'st', 'dz', 'cr', 'ak', 'tum', 'lg', 'ff', + 'ik', 'ny', 'tw', 'ch', 'xh', ] self.langs = dict([(lang, '%s.wikipedia.org' % lang) Modified: trunk/pywikipedia/families/wikiquote_family.py =================================================================== --- trunk/pywikipedia/families/wikiquote_family.py 2013-06-02 08:19:22 UTC (rev 11607) +++ trunk/pywikipedia/families/wikiquote_family.py 2013-06-02 08:19:49 UTC (rev 11608) @@ -15,7 +15,7 @@ 'bs', 'tr', 'sl', 'he', 'uk', 'lt', 'eo', 'el', 'id', 'zh', 'fa', 'hu', 'fi', 'sv', 'nl', 'li', 'ca', 'no', 'nn', 'hr', 'sa', 'ja', 'az', 'hy', 'ar', 'et', 'ko', 'ml', 'cy', 'ka', 'gl', 'sr', 'ro', - 'ku', 'th', 'te', 'is', 'eu', 'da', 'af', 'vi', 'sq', 'ta', 'hi', + 'ku', 'th', 'te', 'is', 'da', 'eu', 'af', 'vi', 'sq', 'ta', 'hi', 'la', 'be', 'br', 'mr', 'uz', 'ur', 'zh-min-nan', 'gu', 'su', 'kn', 'wo', 'ky', 'am', ] Modified: trunk/pywikipedia/families/wikisource_family.py =================================================================== --- trunk/pywikipedia/families/wikisource_family.py 2013-06-02 08:19:22 UTC (rev 11607) +++ trunk/pywikipedia/families/wikisource_family.py 2013-06-02 08:19:49 UTC (rev 11608) @@ -12,9 +12,9 @@ self.languages_by_size = [ 'fr', 'en', 'de', 'ru', 'it', 'pl', 'zh', 'he', 'pt', 'es', 'sv', - 'fa', 'ca', 'hu', 'cs', 'ar', 'ko', 'sl', 'ro', 'fi', 'vi', 'te', + 'ca', 'fa', 'hu', 'cs', 'ar', 'ko', 'sl', 'ro', 'fi', 'vi', 'te', 'sa', 'el', 'sr', 'hr', 'bn', 'th', 'no', 'hy', 'nl', 'ml', 'la', - 'vec', 'ja', 'tr', 'eo', 'br', 'gu', 'yi', 'mk', 'is', 'uk', 'ta', + 'vec', 'ja', 'tr', 'eo', 'br', 'gu', 'is', 'uk', 'yi', 'mk', 'ta', 'id', 'be', 'da', 'li', 'et', 'bg', 'as', 'mr', 'bs', 'sah', 'az', 'gl', 'kn', 'lt', 'cy', 'sk', 'zh-min-nan', 'fo', ] Modified: trunk/pywikipedia/families/wikiversity_family.py =================================================================== --- trunk/pywikipedia/families/wikiversity_family.py 2013-06-02 08:19:22 UTC (rev 11607) +++ trunk/pywikipedia/families/wikiversity_family.py 2013-06-02 08:19:49 UTC (rev 11608) @@ -11,7 +11,7 @@ self.name = 'wikiversity' self.languages_by_size = [ - 'en', 'fr', 'de', 'beta', 'cs', 'ru', 'it', 'es', 'pt', 'ar', 'sv', + 'en', 'fr', 'de', 'beta', 'cs', 'ru', 'it', 'pt', 'es', 'ar', 'sv', 'fi', 'el', 'sl', 'ko', 'ja', ] Modified: trunk/pywikipedia/families/wiktionary_family.py =================================================================== --- trunk/pywikipedia/families/wiktionary_family.py 2013-06-02 08:19:22 UTC (rev 11607) +++ trunk/pywikipedia/families/wiktionary_family.py 2013-06-02 08:19:49 UTC (rev 11608) @@ -12,16 +12,16 @@ self.languages_by_size = [ 'en', 'mg', 'fr', 'zh', 'lt', 'ru', 'el', 'pl', 'ko', 'sv', 'tr', - 'ta', 'nl', 'ku', 'de', 'kn', 'vi', 'fi', 'io', 'pt', 'hu', 'ml', - 'no', 'my', 'id', 'it', 'li', 'es', 'et', 'ja', 'te', 'fa', 'ro', - 'ar', 'cs', 'jv', 'eu', 'gl', 'lo', 'ca', 'uk', 'fj', 'br', 'bg', + 'ta', 'nl', 'ku', 'de', 'kn', 'vi', 'fi', 'io', 'hu', 'pt', 'ml', + 'no', 'my', 'id', 'it', 'es', 'li', 'et', 'ja', 'te', 'fa', 'ro', + 'cs', 'ar', 'jv', 'eu', 'gl', 'lo', 'ca', 'uk', 'fj', 'br', 'bg', 'eo', 'hr', 'oc', 'vo', 'is', 'th', 'zh-min-nan', 'simple', 'cy', 'ps', 'scn', 'sr', 'af', 'ast', 'sw', 'fy', 'tl', 'he', 'nn', 'da', 'ur', 'uz', 'wa', 'la', 'hy', 'sq', 'sm', 'sl', 'nah', 'hi', 'ka', 'pnb', 'az', 'tt', 'bs', 'lv', 'lb', 'tk', 'hsb', 'kk', 'sk', 'km', - 'mk', 'be', 'ga', 'nds', 'wo', 'ms', 'ang', 'ky', 'co', 'gn', 'mr', - 'csb', 'st', 'ia', 'sd', 'si', 'sh', 'sa', 'tg', 'ug', 'mn', 'kl', - 'jbo', 'an', 'ln', 'zu', 'or', 'fo', 'gu', 'kw', 'rw', 'gv', 'qu', + 'mk', 'be', 'nds', 'ga', 'wo', 'ms', 'ang', 'ky', 'co', 'gn', 'mr', + 'csb', 'st', 'ia', 'sd', 'sa', 'si', 'sh', 'tg', 'ug', 'mn', 'kl', + 'jbo', 'or', 'an', 'ln', 'zu', 'fo', 'gu', 'kw', 'rw', 'gv', 'qu', 'ss', 'vec', 'ie', 'mt', 'om', 'chr', 'roa-rup', 'iu', 'bn', 'pa', 'so', 'am', 'su', 'za', 'gd', 'mi', 'tpi', 'ne', 'yi', 'ti', 'sg', 'na', 'dv', 'tn', 'ha', 'ks', 'ay', 'ts',
1
0
0
0
SVN: [11607] branches/rewrite/pywikibot/families
by xqt@svn.wikimedia.org
02 Jun '13
02 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11607
Revision: 11607 Author: xqt Date: 2013-06-02 08:19:22 +0000 (Sun, 02 Jun 2013) Log Message: ----------- update language_by_site Modified Paths: -------------- branches/rewrite/pywikibot/families/wikibooks_family.py branches/rewrite/pywikibot/families/wikipedia_family.py branches/rewrite/pywikibot/families/wikiquote_family.py branches/rewrite/pywikibot/families/wikisource_family.py branches/rewrite/pywikibot/families/wikiversity_family.py branches/rewrite/pywikibot/families/wiktionary_family.py Modified: branches/rewrite/pywikibot/families/wikibooks_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikibooks_family.py 2013-06-02 08:14:30 UTC (rev 11606) +++ branches/rewrite/pywikibot/families/wikibooks_family.py 2013-06-02 08:19:22 UTC (rev 11607) @@ -11,12 +11,12 @@ self.name = 'wikibooks' self.languages_by_size = [ - 'en', 'de', 'fr', 'hu', 'ja', 'pt', 'it', 'vi', 'nl', 'pl', 'es', - 'he', 'id', 'sq', 'ca', 'fi', 'ru', 'cs', 'zh', 'sv', 'hr', 'tr', - 'da', 'no', 'th', 'sr', 'gl', 'fa', 'ko', 'ta', 'ar', 'mk', 'tl', - 'ro', 'is', 'tt', 'lt', 'ka', 'az', 'eo', 'uk', 'bg', 'el', 'hy', - 'sk', 'sl', 'si', 'li', 'ms', 'la', 'ang', 'ia', 'cv', 'et', 'ur', - 'mr', 'bn', 'hi', 'ml', 'oc', 'kk', 'km', 'eu', 'fy', 'ie', 'ne', + 'en', 'de', 'fr', 'hu', 'ja', 'pt', 'it', 'nl', 'pl', 'es', 'he', + 'id', 'sq', 'ca', 'fi', 'ru', 'cs', 'zh', 'sv', 'hr', 'tr', 'da', + 'no', 'th', 'sr', 'ko', 'gl', 'fa', 'vi', 'ta', 'ar', 'mk', 'tl', + 'ro', 'is', 'tt', 'lt', 'ka', 'az', 'eo', 'uk', 'sk', 'bg', 'el', + 'hy', 'sl', 'si', 'li', 'ms', 'la', 'ang', 'ia', 'cv', 'et', 'ur', + 'mr', 'bn', 'ml', 'hi', 'oc', 'kk', 'km', 'eu', 'fy', 'ie', 'ne', 'sa', 'te', 'af', 'tg', 'ky', 'bs', 'pa', 'mg', 'be', 'cy', 'zh-min-nan', 'ku', 'uz', ] Modified: branches/rewrite/pywikibot/families/wikipedia_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikipedia_family.py 2013-06-02 08:14:30 UTC (rev 11606) +++ branches/rewrite/pywikibot/families/wikipedia_family.py 2013-06-02 08:19:22 UTC (rev 11607) @@ -17,28 +17,28 @@ 'lt', 'eu', 'bg', 'he', 'hr', 'sl', 'uz', 'vo', 'et', 'hi', 'nn', 'gl', 'simple', 'az', 'la', 'el', 'sh', 'th', 'ka', 'mk', 'oc', 'new', 'pms', 'tl', 'be', 'ta', 'ht', 'te', 'be-x-old', 'cy', 'lv', - 'bs', 'br', 'sq', 'hy', 'mg', 'tt', 'jv', 'mr', 'lb', 'is', 'my', - 'yo', 'ml', 'ba', 'an', 'lmo', 'af', 'fy', 'pnb', 'bn', 'sw', 'bpy', - 'io', 'ky', 'ur', 'ne', 'scn', 'zh-yue', 'gu', 'nds', 'ga', 'ku', + 'bs', 'hy', 'br', 'sq', 'tt', 'jv', 'mg', 'mr', 'lb', 'is', 'my', + 'ml', 'yo', 'ba', 'an', 'lmo', 'af', 'fy', 'pnb', 'bn', 'sw', 'io', + 'bpy', 'ky', 'ur', 'ne', 'scn', 'zh-yue', 'gu', 'nds', 'ga', 'ku', 'ast', 'qu', 'su', 'cv', 'sco', 'als', 'ia', 'nap', 'bug', 'bat-smg', 'kn', 'map-bms', 'wa', 'am', 'ckb', 'gd', 'hif', - 'zh-min-nan', 'tg', 'arz', 'mzn', 'yi', 'vec', 'mn', 'nah', - 'roa-tara', 'sah', 'sa', 'os', 'pam', 'hsb', 'si', 'se', 'bar', - 'li', 'mi', 'co', 'gan', 'fo', 'ilo', 'bo', 'pa', 'glk', 'rue', - 'bcl', 'fiu-vro', 'mrj', 'nds-nl', 'tk', 'ps', 'vls', 'xmf', 'gv', - 'diq', 'min', 'or', 'kv', 'pag', 'zea', 'km', 'dv', 'nrm', 'mhr', - 'rm', 'koi', 'udm', 'csb', 'frr', 'vep', 'lad', 'lij', 'wuu', 'fur', - 'zh-classical', 'ug', 'sc', 'stq', 'ay', 'mt', 'pi', 'so', 'bh', - 'ksh', 'nov', 'ang', 'hak', 'kw', 'nv', 'pcd', 'gn', 'ext', 'frp', - 'as', 'szl', 'gag', 'eml', 'ie', 'ln', 'ace', 'ce', 'krc', 'pfl', + 'zh-min-nan', 'tg', 'arz', 'mzn', 'yi', 'vec', 'mn', 'sah', 'nah', + 'roa-tara', 'sa', 'os', 'pam', 'hsb', 'si', 'bar', 'se', 'li', 'mi', + 'co', 'pa', 'fo', 'ilo', 'gan', 'bo', 'glk', 'rue', 'bcl', + 'fiu-vro', 'mrj', 'nds-nl', 'tk', 'ps', 'vls', 'xmf', 'gv', 'diq', + 'min', 'or', 'kv', 'pag', 'zea', 'km', 'dv', 'nrm', 'mhr', 'rm', + 'koi', 'csb', 'udm', 'frr', 'vep', 'lad', 'lij', 'wuu', 'fur', + 'zh-classical', 'sc', 'ug', 'stq', 'mt', 'ay', 'pi', 'so', 'bh', + 'ksh', 'nov', 'hak', 'ang', 'kw', 'pcd', 'nv', 'gn', 'ext', 'frp', + 'as', 'szl', 'eml', 'ce', 'gag', 'ace', 'ie', 'ln', 'pfl', 'krc', 'xal', 'haw', 'pdc', 'rw', 'crh', 'to', 'dsb', 'kl', 'arc', 'myv', 'kab', 'lez', 'bjn', 'sn', 'pap', 'tpi', 'lbe', 'wo', 'jbo', 'mdf', - 'cbk-zam', 'av', 'kbd', 'srn', 'mwl', 'ty', 'lo', 'ab', 'tet', - 'ltg', 'kg', 'na', 'ig', 'bxr', 'nso', 'za', 'kaa', 'zu', 'chy', - 'rmy', 'roa-rup', 'cu', 'tn', 'chr', 'bi', 'cdo', 'got', 'sm', 'bm', - 'iu', 'pih', 'pnt', 'sd', 'ss', 'ki', 'ee', 'ha', 'om', 'fj', 'ti', - 'ts', 'ks', 've', 'sg', 'rn', 'st', 'dz', 'ak', 'cr', 'tum', 'lg', - 'ik', 'ff', 'ny', 'tw', 'ch', 'xh', + 'cbk-zam', 'mwl', 'av', 'kbd', 'srn', 'ty', 'lo', 'ab', 'kg', 'tet', + 'ltg', 'na', 'ig', 'bxr', 'nso', 'za', 'kaa', 'zu', 'chy', 'rmy', + 'cu', 'tn', 'chr', 'roa-rup', 'bi', 'cdo', 'got', 'sm', 'bm', 'iu', + 'pih', 'pnt', 'sd', 'ss', 'ki', 'ee', 'ha', 'om', 'fj', 'ti', 'ts', + 'ks', 've', 'sg', 'rn', 'st', 'dz', 'cr', 'ak', 'tum', 'lg', 'ff', + 'ik', 'ny', 'tw', 'ch', 'xh', ] self.langs = dict([(lang, '%s.wikipedia.org' % lang) Modified: branches/rewrite/pywikibot/families/wikiquote_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikiquote_family.py 2013-06-02 08:14:30 UTC (rev 11606) +++ branches/rewrite/pywikibot/families/wikiquote_family.py 2013-06-02 08:19:22 UTC (rev 11607) @@ -15,7 +15,7 @@ 'bs', 'tr', 'sl', 'he', 'uk', 'lt', 'eo', 'el', 'id', 'zh', 'fa', 'hu', 'fi', 'sv', 'nl', 'li', 'ca', 'no', 'nn', 'hr', 'sa', 'ja', 'az', 'hy', 'ar', 'et', 'ko', 'ml', 'cy', 'ka', 'gl', 'sr', 'ro', - 'ku', 'th', 'te', 'is', 'eu', 'da', 'af', 'vi', 'sq', 'ta', 'hi', + 'ku', 'th', 'te', 'is', 'da', 'eu', 'af', 'vi', 'sq', 'ta', 'hi', 'la', 'be', 'br', 'mr', 'uz', 'ur', 'zh-min-nan', 'gu', 'su', 'kn', 'wo', 'ky', 'am', ] Modified: branches/rewrite/pywikibot/families/wikisource_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikisource_family.py 2013-06-02 08:14:30 UTC (rev 11606) +++ branches/rewrite/pywikibot/families/wikisource_family.py 2013-06-02 08:19:22 UTC (rev 11607) @@ -12,9 +12,9 @@ self.languages_by_size = [ 'fr', 'en', 'de', 'ru', 'it', 'pl', 'zh', 'he', 'pt', 'es', 'sv', - 'fa', 'ca', 'hu', 'cs', 'ar', 'ko', 'sl', 'ro', 'fi', 'vi', 'te', + 'ca', 'fa', 'hu', 'cs', 'ar', 'ko', 'sl', 'ro', 'fi', 'vi', 'te', 'sa', 'el', 'sr', 'hr', 'bn', 'th', 'no', 'hy', 'nl', 'ml', 'la', - 'vec', 'ja', 'tr', 'eo', 'br', 'gu', 'yi', 'mk', 'is', 'uk', 'ta', + 'vec', 'ja', 'tr', 'eo', 'br', 'gu', 'is', 'uk', 'yi', 'mk', 'ta', 'id', 'be', 'da', 'li', 'et', 'bg', 'as', 'mr', 'bs', 'sah', 'az', 'gl', 'kn', 'lt', 'cy', 'sk', 'zh-min-nan', 'fo', ] Modified: branches/rewrite/pywikibot/families/wikiversity_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikiversity_family.py 2013-06-02 08:14:30 UTC (rev 11606) +++ branches/rewrite/pywikibot/families/wikiversity_family.py 2013-06-02 08:19:22 UTC (rev 11607) @@ -11,7 +11,7 @@ self.name = 'wikiversity' self.languages_by_size = [ - 'en', 'fr', 'de', 'beta', 'cs', 'ru', 'it', 'es', 'pt', 'ar', 'sv', + 'en', 'fr', 'de', 'beta', 'cs', 'ru', 'it', 'pt', 'es', 'ar', 'sv', 'fi', 'el', 'sl', 'ko', 'ja', ] Modified: branches/rewrite/pywikibot/families/wiktionary_family.py =================================================================== --- branches/rewrite/pywikibot/families/wiktionary_family.py 2013-06-02 08:14:30 UTC (rev 11606) +++ branches/rewrite/pywikibot/families/wiktionary_family.py 2013-06-02 08:19:22 UTC (rev 11607) @@ -12,16 +12,16 @@ self.languages_by_size = [ 'en', 'mg', 'fr', 'zh', 'lt', 'ru', 'el', 'pl', 'ko', 'sv', 'tr', - 'ta', 'nl', 'ku', 'de', 'kn', 'vi', 'fi', 'io', 'pt', 'hu', 'ml', - 'no', 'my', 'id', 'it', 'li', 'es', 'et', 'ja', 'te', 'fa', 'ro', - 'ar', 'cs', 'jv', 'eu', 'gl', 'lo', 'ca', 'uk', 'fj', 'br', 'bg', + 'ta', 'nl', 'ku', 'de', 'kn', 'vi', 'fi', 'io', 'hu', 'pt', 'ml', + 'no', 'my', 'id', 'it', 'es', 'li', 'et', 'ja', 'te', 'fa', 'ro', + 'cs', 'ar', 'jv', 'eu', 'gl', 'lo', 'ca', 'uk', 'fj', 'br', 'bg', 'eo', 'hr', 'oc', 'vo', 'is', 'th', 'zh-min-nan', 'simple', 'cy', 'ps', 'scn', 'sr', 'af', 'ast', 'sw', 'fy', 'tl', 'he', 'nn', 'da', 'ur', 'uz', 'wa', 'la', 'hy', 'sq', 'sm', 'sl', 'nah', 'hi', 'ka', 'pnb', 'az', 'tt', 'bs', 'lv', 'lb', 'tk', 'hsb', 'kk', 'sk', 'km', - 'mk', 'be', 'ga', 'nds', 'wo', 'ms', 'ang', 'ky', 'co', 'gn', 'mr', - 'csb', 'st', 'ia', 'sd', 'si', 'sh', 'sa', 'tg', 'ug', 'mn', 'kl', - 'jbo', 'an', 'ln', 'zu', 'or', 'fo', 'gu', 'kw', 'rw', 'gv', 'qu', + 'mk', 'be', 'nds', 'ga', 'wo', 'ms', 'ang', 'ky', 'co', 'gn', 'mr', + 'csb', 'st', 'ia', 'sd', 'sa', 'si', 'sh', 'tg', 'ug', 'mn', 'kl', + 'jbo', 'or', 'an', 'ln', 'zu', 'fo', 'gu', 'kw', 'rw', 'gv', 'qu', 'ss', 'vec', 'ie', 'mt', 'om', 'chr', 'roa-rup', 'iu', 'bn', 'pa', 'so', 'am', 'su', 'za', 'gd', 'mi', 'tpi', 'ne', 'yi', 'ti', 'sg', 'na', 'dv', 'tn', 'ha', 'ks', 'ay', 'ts',
1
0
0
0
SVN: [11606] trunk/pywikipedia/families
by xqt@svn.wikimedia.org
02 Jun '13
02 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11606
Revision: 11606 Author: xqt Date: 2013-06-02 08:14:30 +0000 (Sun, 02 Jun 2013) Log Message: ----------- update namespace aliases Modified Paths: -------------- trunk/pywikipedia/families/wikibooks_family.py trunk/pywikipedia/families/wikidata_family.py trunk/pywikipedia/families/wikinews_family.py trunk/pywikipedia/families/wikiquote_family.py trunk/pywikipedia/families/wikisource_family.py trunk/pywikipedia/families/wiktionary_family.py Modified: trunk/pywikipedia/families/wikibooks_family.py =================================================================== --- trunk/pywikipedia/families/wikibooks_family.py 2013-06-02 05:53:46 UTC (rev 11605) +++ trunk/pywikipedia/families/wikibooks_family.py 2013-06-02 08:14:30 UTC (rev 11606) @@ -25,25 +25,30 @@ for lang in self.languages_by_size]) # Override defaults + self.namespaces[14]['bn'] = [u'বিষয়শ্রেণী'] self.namespaces[15]['bn'] = [u'বিষয়শ্রেণী আলোচনা'] - self.namespaces[14]['bn'] = [u'বিষয়শ্রেণী'] + self.namespaces[2]['ca'] = [u'Usuari'] self.namespaces[3]['ca'] = [u'Usuari Discussió'] - self.namespaces[2]['ca'] = [u'Usuari'] + self.namespaces[2]['cs'] = [u'Uživatel', u'Uživatelka'] self.namespaces[3]['cs'] = [u'Diskuse s uživatelem', u'Uživatel diskuse', u'Uživatelka diskuse', u'Diskuse s uživatelkou'] - self.namespaces[2]['cs'] = [u'Uživatel', u'Uživatelka'] self.namespaces[9]['da'] = [u'MediaWiki diskussion', u'MediaWiki-diskussion'] + self.namespaces[13]['da'] = [u'Hjælp diskussion', u'Hjælp-diskussion'] self.namespaces[14]['en'] = [u'Category', u'CAT'] + self.namespaces[2]['eo'] = [u'Uzanto', u'Vikipediisto', u'Uzulo', u'Uzantino'] + self.namespaces[3]['eo'] = [u'Uzanto-Diskuto', u'Vikipediista diskuto', u'Uzula diskuto', u'Uzanta diskuto', u'Uzantino-Diskuto'] self.namespaces[2]['fr'] = [u'Utilisateur'] self.namespaces[3]['fr'] = [u'Discussion utilisateur', u'Discussion Utilisateur'] - self.namespaces[13]['da'] = [u'Hjælp diskussion', u'Hjælp-diskussion'] + self.namespaces[8]['hi'] = [u'मीडियाविकि'] + self.namespaces[9]['hi'] = [u'मीडियाविकि वार्ता'] + self.namespaces[2]['pl'] = [u'Wikipedysta', u'Wikipedystka', u'Użytkownik', u'Użytkowniczka'] self.namespaces[3]['pl'] = [u'Dyskusja wikipedysty', u'Dyskusja wikipedystki', u'Dyskusja użytkownika', u'Dyskusja użytkowniczki'] - self.namespaces[2]['pl'] = [u'Wikipedysta', u'Wikipedystka', u'Użytkownik', u'Użytkowniczka'] self.namespaces[2]['pt'] = [u'Utilizador', u'Usuário', u'Utilizadora'] self.namespaces[3]['pt'] = [u'Utilizador Discussão', u'Usuário Discussão', u'Utilizadora Discussão'] self.namespaces[9]['ro'] = [u'Discuție MediaWiki', u'Discuţie MediaWiki'] self.namespaces[14]['tr'] = [u'Kategori', u'KAT'] self.namespaces[10]['zh'] = [u'Template', u'模板', u'样板', u'樣板'] self.namespaces[12]['zh'] = [u'Help', u'帮助', u'幫助'] + self.namespaces[828]['zh'] = [u'模块'] # Most namespaces are inherited from family.Family. # Translation used on all wikis for the different namespaces. Modified: trunk/pywikipedia/families/wikidata_family.py =================================================================== --- trunk/pywikipedia/families/wikidata_family.py 2013-06-02 05:53:46 UTC (rev 11605) +++ trunk/pywikipedia/families/wikidata_family.py 2013-06-02 08:14:30 UTC (rev 11606) @@ -17,8 +17,8 @@ } # Override defaults + self.namespaces[0]['repo'] = [u'', u'Item'] self.namespaces[1]['repo'] = [u'Talk', u'Item talk'] - self.namespaces[0]['repo'] = [u'', u'Item'] del(self.namespaces[828]['_default']) del(self.namespaces[829]['_default']) self.namespaces[828]['client'] = u'Module' Modified: trunk/pywikipedia/families/wikinews_family.py =================================================================== --- trunk/pywikipedia/families/wikinews_family.py 2013-06-02 05:53:46 UTC (rev 11605) +++ trunk/pywikipedia/families/wikinews_family.py 2013-06-02 08:14:30 UTC (rev 11606) @@ -20,20 +20,23 @@ for lang in self.languages_by_size]) # Override defaults - self.namespaces[14]['en'] = [u'Category', u'CAT'] - self.namespaces[2]['fr'] = [u'Utilisateur'] - self.namespaces[3]['fr'] = [u'Discussion utilisateur', u'Discussion Utilisateur'] - self.namespaces[2]['pt'] = [u'Utilizador', u'Usuário', u'Utilizadora'] - self.namespaces[3]['pt'] = [u'Utilizador Discussão', u'Usuário Discussão', u'Utilizadora Discussão'] self.namespaces[2]['ca'] = [u'Usuari'] self.namespaces[3]['ca'] = [u'Usuari Discussió'] self.namespaces[2]['cs'] = [u'Redaktor', u'Redaktorka', u'Uživatel', u'Uživatelka'] self.namespaces[3]['cs'] = [u'Diskuse s redaktorem', u'Diskuse s redaktorkou', u'Diskuse s uživatelem', u'Redaktor diskuse', u'Redaktorka diskuse', u'Uživatel diskuse', u'Uživatelka diskuse', u'Diskuse s uživatelkou'] + self.namespaces[14]['en'] = [u'Category', u'CAT'] + self.namespaces[2]['eo'] = [u'Uzanto', u'Vikipediisto', u'Uzulo', u'Uzantino'] + self.namespaces[3]['eo'] = [u'Uzanto-Diskuto', u'Vikipediista diskuto', u'Uzula diskuto', u'Uzanta diskuto', u'Uzantino-Diskuto'] + self.namespaces[2]['fr'] = [u'Utilisateur'] + self.namespaces[3]['fr'] = [u'Discussion utilisateur', u'Discussion Utilisateur'] self.namespaces[2]['pl'] = [u'Wikireporter', u'Wikireporterka'] self.namespaces[3]['pl'] = [u'Dyskusja wikireportera', u'Dyskusja wikireporterki'] + self.namespaces[2]['pt'] = [u'Utilizador', u'Usuário', u'Utilizadora'] + self.namespaces[3]['pt'] = [u'Utilizador Discussão', u'Usuário Discussão', u'Utilizadora Discussão'] self.namespaces[10]['zh'] = [u'Template', u'模板', u'样板', u'樣板'] self.namespaces[12]['zh'] = [u'Help', u'帮助', u'幫助'] self.namespaces[14]['zh'] = [u'Category', u'分类', u'分類'] + self.namespaces[828]['zh'] = [u'模块'] # Most namespaces are inherited from family.Family. # Translation used on all wikis for the different namespaces. Modified: trunk/pywikipedia/families/wikiquote_family.py =================================================================== --- trunk/pywikipedia/families/wikiquote_family.py 2013-06-02 05:53:46 UTC (rev 11605) +++ trunk/pywikipedia/families/wikiquote_family.py 2013-06-02 08:14:30 UTC (rev 11606) @@ -31,8 +31,12 @@ self.namespaces[9]['da'] = [u'MediaWiki diskussion', u'MediaWiki-diskussion'] self.namespaces[13]['da'] = [u'Hjælp diskussion', u'Hjælp-diskussion'] self.namespaces[3]['de'] = [u'Benutzer Diskussion', u'BD', u'Benutzerin Diskussion'] + self.namespaces[2]['eo'] = [u'Uzanto', u'Vikipediisto', u'Uzulo', u'Uzantino'] + self.namespaces[3]['eo'] = [u'Uzanto-Diskuto', u'Vikipediista diskuto', u'Uzula diskuto', u'Uzanta diskuto', u'Uzantino-Diskuto'] self.namespaces[2]['fr'] = [u'Utilisateur'] self.namespaces[3]['fr'] = [u'Discussion utilisateur', u'Discussion Utilisateur'] + self.namespaces[8]['hi'] = [u'मीडियाविकि'] + self.namespaces[9]['hi'] = [u'मीडियाविकि वार्ता'] self.namespaces[2]['pl'] = [u'Użytkownik', u'Użytkowniczka'] self.namespaces[3]['pl'] = [u'Dyskusja użytkownika', u'Dyskusja użytkowniczki'] self.namespaces[2]['pt'] = [u'Utilizador', u'Usuário', u'Utilizadora'] @@ -41,6 +45,7 @@ self.namespaces[10]['zh'] = [u'Template', u'模板', u'样板', u'樣板'] self.namespaces[12]['zh'] = [u'Help', u'帮助', u'幫助'] self.namespaces[14]['zh'] = [u'Category', u'分类', u'分類'] + self.namespaces[828]['zh'] = [u'模块'] # Most namespaces are inherited from family.Family. # Translation used on all wikis for the different namespaces. @@ -168,7 +173,7 @@ 'kk': u'Уикидәйек талқылауы', 'kn': u'Wikiquote ಚರ್ಚೆ', 'ko': u'위키인용집토론', - 'ku': [u'Gotûbêja Wîkîgotinê', u'Wikiquote nîqaş'], + 'ku': [u'Gotûbêja Wîkîgotinê', u'Wîkîgotin nîqaş'], 'ky': u'Wikiquote баарлашуу', 'la': u'Disputatio Vicicitationis', 'lb': u'Wikiquote Diskussioun', Modified: trunk/pywikipedia/families/wikisource_family.py =================================================================== --- trunk/pywikipedia/families/wikisource_family.py 2013-06-02 05:53:46 UTC (rev 11605) +++ trunk/pywikipedia/families/wikisource_family.py 2013-06-02 08:14:30 UTC (rev 11606) @@ -24,15 +24,17 @@ self.langs['-'] = '
wikisource.org
' # Override defaults + self.namespaces[14]['as'] = [u'শ্ৰেণী', u'श्रेणी', u'শ্রেণী'] self.namespaces[14]['bn'] = [u'বিষয়শ্রেণী'] self.namespaces[15]['bn'] = [u'বিষয়শ্রেণী আলোচনা'] - self.namespaces[14]['as'] = [u'শ্ৰেণী', u'श्रेणी', u'শ্রেণী'] self.namespaces[2]['ca'] = [u'Usuari'] self.namespaces[3]['ca'] = [u'Usuari Discussió'] + self.namespaces[2]['cs'] = [u'Uživatel', u'Uživatelka'] self.namespaces[3]['cs'] = [u'Diskuse s uživatelem', u'Uživatel diskuse', u'Uživatelka diskuse', u'Diskuse s uživatelkou'] - self.namespaces[2]['cs'] = [u'Uživatel', u'Uživatelka'] self.namespaces[9]['da'] = [u'MediaWiki diskussion', u'MediaWiki-diskussion'] self.namespaces[13]['da'] = [u'Hjælp diskussion', u'Hjælp-diskussion'] + self.namespaces[2]['eo'] = [u'Uzanto', u'Vikipediisto', u'Uzulo', u'Uzantino'] + self.namespaces[3]['eo'] = [u'Uzanto-Diskuto', u'Vikipediista diskuto', u'Uzula diskuto', u'Uzanta diskuto', u'Uzantino-Diskuto'] self.namespaces[2]['fr'] = [u'Utilisateur'] self.namespaces[3]['fr'] = [u'Discussion utilisateur', u'Discussion Utilisateur'] self.namespaces[12]['ml'] = [u'സഹായം', u'H', u'സ'] @@ -45,6 +47,7 @@ self.namespaces[10]['zh'] = [u'Template', u'模板', u'样板', u'樣板'] self.namespaces[12]['zh'] = [u'Help', u'帮助', u'幫助'] self.namespaces[14]['zh'] = [u'Category', u'分类', u'分類'] + self.namespaces[828]['zh'] = [u'模块'] # Most namespaces are inherited from family.Family. # Translation used on all wikis for the different namespaces. @@ -112,7 +115,7 @@ 'te': [u'వికీసోర్స్', u'Wikisource'], 'th': [u'วิกิซอร์ซ', u'Wikisource'], 'tr': [u'Vikikaynak', u'VikiKaynak', u'Wikisource'], - 'uk': [u'Wikisource', u'ВД'], + 'uk': [u'Вікіджерела', u'ВД', u'Wikisource'], 'vec': u'Wikisource', 'vi': u'Wikisource', 'yi': [u'װיקיביבליאָטעק', u'וויקיביבליאטעק', u'Wikisource'], @@ -181,7 +184,7 @@ 'te': u'వికీసోర్స్ చర్చ', 'th': u'คุยเรื่องวิกิซอร์ซ', 'tr': [u'Vikikaynak tartışma', u'Oluşturuluyor VikiKaynak tartışma'], - 'uk': u'Обговорення Wikisource', + 'uk': [u'Обговорення Вікіджерел', u'Обговорення Wikisource'], 'vec': u'Discussion Wikisource', 'vi': u'Thảo luận Wikisource', 'yi': [u'װיקיביבליאָטעק רעדן', u'וויקיביבליאטעק רעדן'], @@ -303,6 +306,7 @@ 'ro': u'Autor', 'sr': u'Додатак', 'te': u'రచయిత', + 'uk': u'Автор', 'vec': u'Pagina', 'vi': u'Tác gia', 'zh': u'Author', @@ -342,6 +346,7 @@ 'ro': u'Discuție Autor', 'sr': u'Разговор о додатку', 'te': u'రచయిత చర్చ', + 'uk': u'Обговорення автора', 'vec': u'Discussion pagina', 'vi': u'Thảo luận Tác gia', 'zh': u'Author talk', @@ -565,9 +570,9 @@ 'sk': u'Page', 'sr': u'Page', 'ta': u'Page', - 'th': u'Page', + 'th': u'หน้า', 'tr': u'Page', - 'uk': u'Page', + 'uk': u'Сторінка', 'yi': u'Page', 'zh-min-nan': u'Page', } @@ -590,9 +595,9 @@ 'sk': u'Page talk', 'sr': u'Page talk', 'ta': u'Page talk', - 'th': u'Page talk', + 'th': u'คุยเรื่องหน้า', 'tr': u'Page talk', - 'uk': u'Page talk', + 'uk': u'Обговорення сторінки', 'yi': u'Page talk', 'zh-min-nan': u'Page talk', } @@ -615,9 +620,9 @@ 'sk': u'Index', 'sr': u'Index', 'ta': u'Index', - 'th': u'Index', + 'th': u'ดัชนี', 'tr': u'Index', - 'uk': u'Index', + 'uk': u'Індекс', 'yi': u'Index', 'zh-min-nan': u'Index', } @@ -640,9 +645,9 @@ 'sk': u'Index talk', 'sr': u'Index talk', 'ta': u'Index talk', - 'th': u'Index talk', + 'th': u'คุยเรื่องดัชนี', 'tr': u'Index talk', - 'uk': u'Index talk', + 'uk': u'Обговорення індексу', 'yi': u'Index talk', 'zh-min-nan': u'Index talk', } Modified: trunk/pywikipedia/families/wiktionary_family.py =================================================================== --- trunk/pywikipedia/families/wiktionary_family.py 2013-06-02 05:53:46 UTC (rev 11605) +++ trunk/pywikipedia/families/wiktionary_family.py 2013-06-02 08:14:30 UTC (rev 11606) @@ -40,15 +40,20 @@ self.namespaces[9]['da'] = [u'MediaWiki diskussion', u'MediaWiki-diskussion'] self.namespaces[13]['da'] = [u'Hjælp diskussion', u'Hjælp-diskussion'] self.namespaces[3]['de'] = [u'Benutzer Diskussion', u'BD', u'Benutzerin Diskussion'] - self.namespaces[3]['eo'] = [u'Uzanta diskuto', u'Vikipediista diskuto', u'Uzula diskuto'] + self.namespaces[2]['eo'] = [u'Uzanto', u'Vikipediisto', u'Uzulo', u'Uzantino'] + self.namespaces[3]['eo'] = [u'Uzanta diskuto', u'Vikipediista diskuto', u'Uzula diskuto', u'Uzanto-Diskuto', u'Uzantino-Diskuto'] self.namespaces[2]['fr'] = [u'Utilisateur'] self.namespaces[3]['fr'] = [u'Discussion utilisateur', u'Discussion Utilisateur'] + self.namespaces[8]['hi'] = [u'मीडियाविकि'] + self.namespaces[9]['hi'] = [u'मीडियाविकि वार्ता'] self.namespaces[2]['pt'] = [u'Utilizador', u'Usuário', u'Utilizadora'] self.namespaces[3]['pt'] = [u'Utilizador Discussão', u'Usuário Discussão', u'Utilizadora Discussão'] self.namespaces[9]['ro'] = [u'Discuție MediaWiki', u'Discuţie MediaWiki'] + self.namespaces[6]['vec'] = [u'File', u'Imagine'] self.namespaces[10]['zh'] = [u'Template', u'模板', u'样板', u'樣板'] self.namespaces[12]['zh'] = [u'Help', u'帮助', u'幫助'] self.namespaces[14]['zh'] = [u'Category', u'分类', u'分類'] + self.namespaces[828]['zh'] = [u'模块'] # Most namespaces are inherited from family.Family. # Translation used on all wikis for the different namespaces.
1
0
0
0
SVN: [11605] trunk/pywikipedia/families/wikipedia_family.py
by xqt@svn.wikimedia.org
02 Jun '13
02 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11605
Revision: 11605 Author: xqt Date: 2013-06-02 05:53:46 +0000 (Sun, 02 Jun 2013) Log Message: ----------- update namespace aliases Modified Paths: -------------- trunk/pywikipedia/families/wikipedia_family.py Modified: trunk/pywikipedia/families/wikipedia_family.py =================================================================== --- trunk/pywikipedia/families/wikipedia_family.py 2013-06-01 21:02:13 UTC (rev 11604) +++ trunk/pywikipedia/families/wikipedia_family.py 2013-06-02 05:53:46 UTC (rev 11605) @@ -117,7 +117,7 @@ 'ca': u'Viquipèdia', 'cbk-zam': u'Wikipedia', 'cdo': u'Wikipedia', - 'ce': [u'Википедийа', u'Wikipedia'], + 'ce': [u'Википеди', u'Википедийа'], 'ceb': u'Wikipedia', 'ch': u'Wikipedia', 'chr': u'Wikipedia', @@ -135,7 +135,7 @@ 'de': [u'Wikipedia', u'WP'], 'diq': u'Wikipedia', 'dsb': u'Wikipedija', - 'dv': u'Wikipedia', + 'dv': u'ވިކިޕީޑި', 'dz': u'Wikipedia', 'ee': u'Wikipedia', 'el': u'Βικιπαίδεια', @@ -392,11 +392,11 @@ 'br': [u'Kaozeadenn Wikipedia', u'Discussion Wikipedia'], 'bs': u'Razgovor s Wikipediom', 'bug': u'Pembicaraan Wikipedia', - 'bxr': u'Википеэди talk', + 'bxr': u'Обсуждение Википеэди', 'ca': u'Viquipèdia Discussió', 'cbk-zam': u'Wikipedia discusión', 'cdo': u'Wikipedia talk', - 'ce': [u'Википедийа дийцаре', u'Википедийа Дийца', u'Дийцаре Википедийа'], + 'ce': [u'Википедин дийцаре', u'Википедийа дийцаре', u'Википеди Дийца', u'Дийцаре Википеди'], 'ceb': [u'Hisgot sa Wikipedia', u'Hisgot saWikipedia'], 'ch': u'Kombetsasion nu Wikipedia', 'chr': u'Wikipedia talk', @@ -414,7 +414,7 @@ 'de': [u'Wikipedia Diskussion', u'WD'], 'diq': u'Wikipedia werênayış', 'dsb': u'Wikipedija diskusija', - 'dv': u'Wikipedia talk', + 'dv': [u'ވިކިޕީޑިއާ ޚިޔާ', u'Wikipedia talk'], 'dz': u'Wikipedia talk', 'ee': u'Wikipedia talk', 'el': [u'Συζήτηση Βικιπαίδεια', u'Βικιπαίδεια συζήτηση'],
1
0
0
0
← Newer
1
...
7
8
9
10
11
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
Results per page:
10
25
50
100
200