http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11006
Revision: 11006 Author: xqt Date: 2013-01-27 14:20:10 +0000 (Sun, 27 Jan 2013) Log Message: ----------- remove default code, some PEP8, update from trunk r11004
Modified Paths: -------------- branches/rewrite/pywikibot/families/wikibooks_family.py branches/rewrite/pywikibot/families/wikinews_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/wikivoyage_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-01-27 14:15:09 UTC (rev 11005) +++ branches/rewrite/pywikibot/families/wikibooks_family.py 2013-01-27 14:20:10 UTC (rev 11006) @@ -21,7 +21,8 @@ 'ku', 'uz', ]
- self.langs = dict([(lang, '%s.wikibooks.org' % lang) for lang in self.languages_by_size]) + self.langs = dict([(lang, '%s.wikibooks.org' % lang) + for lang in self.languages_by_size])
# CentralAuth cross avaliable projects. self.cross_projects = [
Modified: branches/rewrite/pywikibot/families/wikinews_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikinews_family.py 2013-01-27 14:15:09 UTC (rev 11005) +++ branches/rewrite/pywikibot/families/wikinews_family.py 2013-01-27 14:20:10 UTC (rev 11006) @@ -16,8 +16,10 @@ 'bg', 'sq', 'uk', 'no', 'ko', 'bs', 'eo', ]
- self.langs = dict([(lang, '%s.wikinews.org' % lang) for lang in self.languages_by_size]) + self.langs = dict([(lang, '%s.wikinews.org' % lang) + for lang in self.languages_by_size])
+ # Global bot allowed languages on http://meta.wikimedia.org/wiki/Bot_policy/Implementation#Current_implementat... self.cross_allowed = ['ca', 'cs', 'en', 'fa',]
@@ -46,6 +48,3 @@ 'zh-tw': 'zh', 'zh-cn': 'zh' } - - def code2encoding(self, code): - return 'utf-8'
Modified: branches/rewrite/pywikibot/families/wikipedia_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikipedia_family.py 2013-01-27 14:15:09 UTC (rev 11005) +++ branches/rewrite/pywikibot/families/wikipedia_family.py 2013-01-27 14:20:10 UTC (rev 11006) @@ -41,8 +41,10 @@ 'ff', 'st', 'tw', 'xh', ]
- self.langs = dict([(lang, '%s.wikipedia.org' % lang) for lang in self.languages_by_size]) + self.langs = dict([(lang, '%s.wikipedia.org' % lang) + for lang in self.languages_by_size])
+ self.category_redirect_templates = { '_default': (), 'ar': (u'تحويل تصنيف',
Modified: branches/rewrite/pywikibot/families/wikiquote_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikiquote_family.py 2013-01-27 14:15:09 UTC (rev 11005) +++ branches/rewrite/pywikibot/families/wikiquote_family.py 2013-01-27 14:20:10 UTC (rev 11006) @@ -20,8 +20,10 @@ 'ky', 'am', ]
- self.langs = dict([(lang, '%s.wikiquote.org' % lang) for lang in self.languages_by_size]) + self.langs = dict([(lang, '%s.wikiquote.org' % lang) + for lang in self.languages_by_size])
+ # attop is a list of languages that prefer to have the interwiki # links at the top of the page. self.interwiki_attop = []
Modified: branches/rewrite/pywikibot/families/wikisource_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikisource_family.py 2013-01-27 14:15:09 UTC (rev 11005) +++ branches/rewrite/pywikibot/families/wikisource_family.py 2013-01-27 14:20:10 UTC (rev 11006) @@ -19,8 +19,8 @@ 'lt', 'kn', 'cy', 'sk', 'zh-min-nan', 'fo', ]
- for lang in self.languages_by_size: - self.langs[lang] = '%s.wikisource.org' % lang + self.langs = dict([(lang, '%s.wikisource.org' % lang) + for lang in self.languages_by_size]) self.langs['-'] = 'wikisource.org'
# Global bot allowed languages on http://meta.wikimedia.org/wiki/Bot_policy/Implementation#Current_implementat...
Modified: branches/rewrite/pywikibot/families/wikiversity_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikiversity_family.py 2013-01-27 14:15:09 UTC (rev 11005) +++ branches/rewrite/pywikibot/families/wikiversity_family.py 2013-01-27 14:20:10 UTC (rev 11006) @@ -15,7 +15,9 @@ 'el', 'sv', 'sl', 'ja', ]
- self.langs = dict([(lang, '%s.wikiversity.org' % lang) for lang in self.languages_by_size]) + self.langs = dict([(lang, '%s.wikiversity.org' % lang) + for lang in self.languages_by_size])
+ # Global bot allowed languages on http://meta.wikimedia.org/wiki/Bot_policy/Implementation#Current_implementat... self.cross_allowed = ['ja',]
Modified: branches/rewrite/pywikibot/families/wikivoyage_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikivoyage_family.py 2013-01-27 14:15:09 UTC (rev 11005) +++ branches/rewrite/pywikibot/families/wikivoyage_family.py 2013-01-27 14:20:10 UTC (rev 11006) @@ -16,6 +16,3 @@
self.langs = dict([(lang, '%s.wikivoyage.org' % lang) for lang in self.languages_by_size]) - - def scriptpath(self, code): - return u'/w'
Modified: branches/rewrite/pywikibot/families/wiktionary_family.py =================================================================== --- branches/rewrite/pywikibot/families/wiktionary_family.py 2013-01-27 14:15:09 UTC (rev 11005) +++ branches/rewrite/pywikibot/families/wiktionary_family.py 2013-01-27 14:20:10 UTC (rev 11006) @@ -27,7 +27,8 @@ 'dv', 'tn', 'ne', 'ha', 'ks', 'ay', 'ts', ]
- self.langs = dict([(lang, '%s.wiktionary.org' % lang) for lang in self.languages_by_size]) + self.langs = dict([(lang, '%s.wiktionary.org' % lang) + for lang in self.languages_by_size])
# Global bot allowed languages on # http://meta.wikimedia.org/wiki/Bot_policy/Implementation#Current_implementat...