http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10511
Revision: 10511 Author: xqt Date: 2012-08-30 20:50:36 +0000 (Thu, 30 Aug 2012) Log Message: ----------- update from trunk r10510; file shorten to wikimedia_family.py and could be invoked by -family:wikimedia
Added Paths: ----------- branches/rewrite/pywikibot/families/wikimedia_family.py
Copied: branches/rewrite/pywikibot/families/wikimedia_family.py (from rev 10510, trunk/pywikipedia/families/wikimediachapter_family.py) =================================================================== --- branches/rewrite/pywikibot/families/wikimedia_family.py (rev 0) +++ branches/rewrite/pywikibot/families/wikimedia_family.py 2012-08-30 20:50:36 UTC (rev 10511) @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- + +__version__ = '$Id$' + +# The wikis of Chapters of the Wikimedia Foundation living at a xy.wikimedia.org url + +from pywikibot import family + +class Family(family.Family): + def __init__(self): + family.Family.__init__(self) + self.name = 'wikimediachapter' + + self.countries = [ + 'ar', 'bd', 'co', 'dk', 'fi', 'mk', 'mx', 'nl', 'no', 'nyc', 'pl', + 'rs', 'ru', 'se', 'ua', 'uk', 've', + ] + + self.countrylangs = { + 'ar': 'es', 'bd': 'bn', 'co': 'es', 'dk': 'da', 'fi': 'fi', + 'mk': 'mk', 'mx': 'es', 'nl': 'nl', 'no': 'no', 'nyc': 'en', + 'pl': 'pl', 'rs': 'sr', 'ru': 'ru', 'se': 'sv', 'ua': 'uk', + 'uk': 'en-gb', 've': 'en', + } + + self.langs = dict([(country, '%s.wikimedia.org' % country) + for country in self.countries]) +