http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11663
Revision: 11663 Author: legoktm Date: 2013-06-18 07:43:45 +0000 (Tue, 18 Jun 2013) Log Message: ----------- Add test.wikidata.org
Modified Paths: -------------- branches/rewrite/pywikibot/families/wikidata_family.py
Modified: branches/rewrite/pywikibot/families/wikidata_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikidata_family.py 2013-06-18 07:30:56 UTC (rev 11662) +++ branches/rewrite/pywikibot/families/wikidata_family.py 2013-06-18 07:43:45 UTC (rev 11663) @@ -6,6 +6,7 @@
# The wikidata family
+ class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() @@ -14,6 +15,7 @@ 'wikidata': 'www.wikidata.org', 'repo': 'wikidata-test-repo.wikimedia.de', 'client': 'wikidata-test-client.wikimedia.de', + 'test': 'test.wikidata.org', }
def shared_data_repository(self, code, transcluded=False): @@ -22,10 +24,14 @@
""" if transcluded: - return(None, None) + return (None, None) else: - return ('wikidata', - 'wikidata') if code == 'wikidata' else ('repo', 'wikidata') + if code == 'wikidata': + return ('wikidata', 'wikidata') + elif code == 'test': + return ('test', 'wikidata') + else: + return ('repo', 'wikidata')
def globes(self, code): """Supported globes for Coordinate datatype"""