Revision: 7200 Author: alexsh Date: 2009-09-03 09:27:00 +0000 (Thu, 03 Sep 2009)
Log Message: ----------- *remove import config.(followed in family.py)
Modified Paths: -------------- trunk/pywikipedia/families/commons_family.py trunk/pywikipedia/families/incubator_family.py trunk/pywikipedia/families/mediawiki_family.py trunk/pywikipedia/families/meta_family.py trunk/pywikipedia/families/species_family.py trunk/pywikipedia/families/test_family.py 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/commons_family.py =================================================================== --- trunk/pywikipedia/families/commons_family.py 2009-09-02 21:40:23 UTC (rev 7199) +++ trunk/pywikipedia/families/commons_family.py 2009-09-03 09:27:00 UTC (rev 7200) @@ -2,7 +2,7 @@
__version__ = '$Id$'
-import family, config +import family
# The Wikimedia Commons family
@@ -13,7 +13,7 @@ self.langs = { 'commons': 'commons.wikimedia.org', } - if config.SSL_connection: + if family.config.SSL_connection: self.langs['commons'] = None
self.namespaces[4] = { @@ -62,7 +62,7 @@ def shared_image_repository(self, code): return ('commons', 'commons')
- if config.SSL_connection: + if family.config.SSL_connection: def hostname(self, code): return 'secure.wikimedia.org'
Modified: trunk/pywikipedia/families/incubator_family.py =================================================================== --- trunk/pywikipedia/families/incubator_family.py 2009-09-02 21:40:23 UTC (rev 7199) +++ trunk/pywikipedia/families/incubator_family.py 2009-09-03 09:27:00 UTC (rev 7200) @@ -2,7 +2,7 @@
__version__ = '$Id$'
-import family, config +import family
# The Wikimedia Incubator family
@@ -13,7 +13,7 @@ self.langs = { 'incubator': 'incubator.wikimedia.org', } - if config.SSL_connection: + if family.config.SSL_connection: self.langs['incubator'] = None
self.namespaces[4] = { @@ -35,7 +35,7 @@ def shared_image_repository(self, code): return ('commons', 'commons')
- if config.SSL_connection: + if family.config.SSL_connection: def hostname(self, code): return 'secure.wikimedia.org'
Modified: trunk/pywikipedia/families/mediawiki_family.py =================================================================== --- trunk/pywikipedia/families/mediawiki_family.py 2009-09-02 21:40:23 UTC (rev 7199) +++ trunk/pywikipedia/families/mediawiki_family.py 2009-09-03 09:27:00 UTC (rev 7200) @@ -2,7 +2,7 @@
__version__ = '$Id$'
-import family, config +import family
# The MediaWiki family # user-config.py: usernames['mediawiki']['mediawiki'] = 'User name' @@ -15,7 +15,7 @@ self.langs = { 'mediawiki': 'www.mediawiki.org', } - if config.SSL_connection: + if family.config.SSL_connection: self.langs['mediawiki'] = None
self.namespaces[4] = { @@ -43,7 +43,7 @@ def shared_image_repository(self, code): return ('commons', 'commons')
- if config.SSL_connection: + if family.config.SSL_connection: def hostname(self, code): return 'secure.wikimedia.org'
Modified: trunk/pywikipedia/families/meta_family.py =================================================================== --- trunk/pywikipedia/families/meta_family.py 2009-09-02 21:40:23 UTC (rev 7199) +++ trunk/pywikipedia/families/meta_family.py 2009-09-03 09:27:00 UTC (rev 7200) @@ -2,7 +2,7 @@
__version__ = '$Id$'
-import family, config +import family
# The meta wikimedia family
@@ -14,7 +14,7 @@ 'meta': 'meta.wikimedia.org', }
- if config.SSL_connection: + if family.config.SSL_connection: self.langs ['meta'] = None
self.namespaces[4] = { @@ -135,7 +135,7 @@ def shared_image_repository(self, code): return ('commons', 'commons')
- if config.SSL_connection: + if family.config.SSL_connection: def hostname(self, code): return 'secure.wikimedia.org'
Modified: trunk/pywikipedia/families/species_family.py =================================================================== --- trunk/pywikipedia/families/species_family.py 2009-09-02 21:40:23 UTC (rev 7199) +++ trunk/pywikipedia/families/species_family.py 2009-09-03 09:27:00 UTC (rev 7200) @@ -2,7 +2,7 @@
__version__ = '$Id$'
-import family, config +import family
# The wikispecies family
@@ -13,7 +13,7 @@ self.langs = { 'species': 'species.wikimedia.org', } - if config.SSL_connection: + if family.config.SSL_connection: self.langs['species'] = None
self.namespaces[4] = { @@ -31,7 +31,7 @@ def shared_image_repository(self, code): return ('commons', 'commons')
- if config.SSL_connection: + if family.config.SSL_connection: def hostname(self, code): return 'secure.wikimedia.org'
Modified: trunk/pywikipedia/families/test_family.py =================================================================== --- trunk/pywikipedia/families/test_family.py 2009-09-02 21:40:23 UTC (rev 7199) +++ trunk/pywikipedia/families/test_family.py 2009-09-03 09:27:00 UTC (rev 7200) @@ -2,7 +2,7 @@
__version__ = '$Id$'
-import family, config +import family
# The test wikipedia family
@@ -13,7 +13,7 @@ self.langs = { 'test': 'test.wikipedia.org', } - if config.SSL_connection: + if family.config.SSL_connection: self.langs['test'] = None
@@ -132,7 +132,7 @@ def shared_image_repository(self, code): return ('commons', 'commons')
- if config.SSL_connection: + if family.config.SSL_connection: def hostname(self, code): return 'secure.wikimedia.org'
Modified: trunk/pywikipedia/families/wikibooks_family.py =================================================================== --- trunk/pywikipedia/families/wikibooks_family.py 2009-09-02 21:40:23 UTC (rev 7199) +++ trunk/pywikipedia/families/wikibooks_family.py 2009-09-03 09:27:00 UTC (rev 7200) @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -import family, config +import family
__version__ = '$Id$'
@@ -23,12 +23,10 @@ 'zu', 'my', ]
- if config.SSL_connection: - for lang in self.languages_by_size: - self.langs[lang] = None + if family.config.SSL_connection: + self.langs = dict([(lang, None) for lang in self.languages_by_size]) else: - for lang in self.languages_by_size: - self.langs[lang] = '%s.wikibooks.org' % lang + self.langs = dict([(lang, '%s.wikibooks.org' % lang) for lang in self.languages_by_size])
# Override defaults self.namespaces[2]['pl'] = u'Wikipedysta' @@ -353,7 +351,7 @@ def shared_image_repository(self, code): return ('commons', 'commons')
- if config.SSL_connection: + if family.config.SSL_connection: def hostname(self, code): return 'secure.wikimedia.org'
Modified: trunk/pywikipedia/families/wikipedia_family.py =================================================================== --- trunk/pywikipedia/families/wikipedia_family.py 2009-09-02 21:40:23 UTC (rev 7199) +++ trunk/pywikipedia/families/wikipedia_family.py 2009-09-03 09:27:00 UTC (rev 7200) @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -import family, config +import family
__version__ = '$Id$'
@@ -39,12 +39,10 @@ 'lg', 'rn', 'ki', 'tum', 'ng', 'mhr', 'ckb', 'pnb', 'mwl', 'ace' ]
- if config.SSL_connection: - for lang in self.languages_by_size: - self.langs[lang] = None + if family.config.SSL_connection: + self.langs = dict([(lang, None) for lang in self.languages_by_size]) else: - for lang in self.languages_by_size: - self.langs[lang] = '%s.wikipedia.org' % lang + self.langs = dict([(lang, '%s.wikipedia.org' % lang) for lang in self.languages_by_size])
# Override defaults self.namespaces[2]['cs'] = u'Wikipedista' @@ -1146,7 +1144,7 @@ def shared_image_repository(self, code): return ('commons', 'commons')
- if config.SSL_connection: + if family.config.SSL_connection: def hostname(self, code): return 'secure.wikimedia.org'
Modified: trunk/pywikipedia/families/wikiquote_family.py =================================================================== --- trunk/pywikipedia/families/wikiquote_family.py 2009-09-02 21:40:23 UTC (rev 7199) +++ trunk/pywikipedia/families/wikiquote_family.py 2009-09-03 09:27:00 UTC (rev 7200) @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -import family, config +import family
__version__ = '$Id$'
@@ -21,12 +21,10 @@ 'am', 'co', 'kk', ]
- if config.SSL_connection: - for lang in self.languages_by_size: - self.langs[lang] = None + if family.config.SSL_connection: + self.langs = dict([(lang, None) for lang in self.languages_by_size]) else: - for lang in self.languages_by_size: - self.langs[lang] = '%s.wikiquote.org' % lang + self.langs = dict([(lang, '%s.wikiquote.org' % lang) for lang in self.languages_by_size])
# Most namespaces are inherited from family.Family. # Translation used on all wikis for the different namespaces. @@ -279,7 +277,7 @@ def shared_image_repository(self, code): return ('commons', 'commons')
- if config.SSL_connection: + if family.config.SSL_connection: def hostname(self, code): return 'secure.wikimedia.org'
Modified: trunk/pywikipedia/families/wikisource_family.py =================================================================== --- trunk/pywikipedia/families/wikisource_family.py 2009-09-02 21:40:23 UTC (rev 7199) +++ trunk/pywikipedia/families/wikisource_family.py 2009-09-03 09:27:00 UTC (rev 7200) @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -import family, config +import family=
__version__ = '$Id$'
@@ -19,7 +19,7 @@ 'sk', 'zh-min-nan', 'fo', ]
- if config.SSL_connection: + if family.config.SSL_connection: for lang in self.languages_by_size: self.langs[lang] = None self.langs['-'] = None @@ -361,7 +361,7 @@ def shared_image_repository(self, code): return ('commons', 'commons')
- if config.SSL_connection: + if family.config.SSL_connection: def hostname(self, code): return 'secure.wikimedia.org'
@@ -375,4 +375,6 @@ return '/%s/%s/w' % (self.name, code)
def nicepath(self, code): + if code == '-': + return '/wikipedia/sources/wiki/' return '/%s/%s/wiki/' % (self.name, code)
Modified: trunk/pywikipedia/families/wikiversity_family.py =================================================================== --- trunk/pywikipedia/families/wikiversity_family.py 2009-09-02 21:40:23 UTC (rev 7199) +++ trunk/pywikipedia/families/wikiversity_family.py 2009-09-03 09:27:00 UTC (rev 7200) @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -import family, config +import family
__version__ = '$Id$'
@@ -15,12 +15,10 @@ 'ja', ]
- if config.SSL_connection: - for lang in self.languages_by_size: - self.langs[lang] = None + if family.config.SSL_connection: + self.langs = dict([(lang, None) for lang in self.languages_by_size]) else: - for lang in self.languages_by_size: - self.langs[lang] = '%s.wikiversity.org' % lang + self.langs = dict([(lang, '%s.wikiversity.org' % lang) for lang in self.languages_by_size])
# Most namespaces are inherited from family.Family. @@ -124,7 +122,7 @@ def shared_image_repository(self, code): return ('commons', 'commons')
- if config.SSL_connection: + if family.config.SSL_connection: def hostname(self, code): return 'secure.wikimedia.org'
Modified: trunk/pywikipedia/families/wiktionary_family.py =================================================================== --- trunk/pywikipedia/families/wiktionary_family.py 2009-09-02 21:40:23 UTC (rev 7199) +++ trunk/pywikipedia/families/wiktionary_family.py 2009-09-03 09:27:00 UTC (rev 7200) @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -import family, config +import family
__version__ = '$Id$'
@@ -28,12 +28,10 @@ 'lb', 'ks', 'fj', 'ln', 'za', 'dz', 'als', ]
- if config.SSL_connection: - for lang in self.languages_by_size: - self.langs[lang] = None + if family.config.SSL_connection: + self.langs = dict([(lang, None) for lang in self.languages_by_size]) else: - for lang in self.languages_by_size: - self.langs[lang] = '%s.wiktionary.org' % lang + self.langs = dict([(lang, '%s.wiktionary.org' % lang) for lang in self.languages_by_size])
# Override defaults self.namespaces[2]['pl'] = u'Wikipedysta' @@ -455,7 +453,7 @@ def shared_image_repository(self, code): return ('commons', 'commons')
- if config.SSL_connection: + if family.config.SSL_connection: def hostname(self, code): return 'secure.wikimedia.org'
pywikipedia-svn@lists.wikimedia.org