Revision: 4442 Author: russblau Date: 2007-10-12 20:17:31 +0000 (Fri, 12 Oct 2007)
Log Message: ----------- Fix logic errors and cleanup in two family files.
Modified Paths: -------------- trunk/pywikipedia/families/jediarchives_family.py trunk/pywikipedia/families/wesolve_family.py
Modified: trunk/pywikipedia/families/jediarchives_family.py =================================================================== --- trunk/pywikipedia/families/jediarchives_family.py 2007-10-10 20:31:14 UTC (rev 4441) +++ trunk/pywikipedia/families/jediarchives_family.py 2007-10-12 20:17:31 UTC (rev 4442) @@ -7,17 +7,17 @@ class Family(family.Family): def __init__(self): family.Family.__init__(self) - name = 'jediarchives' - self.langs = { + self.name = 'jediarchives' + self.langs = { 'en': 'jediarchives.info', - } - self.namespaces[4] = { - '_default': [u'JediArchives', self.namespaces[4]['_default']], - } - self.namespaces[5] = { - '_default': [u'JediArchives talk', self.namespaces[5]['_default']], - } - + } + self.namespaces[4] = { + '_default': [u'JediArchives', self.namespaces[4]['_default']], + } + self.namespaces[5] = { + '_default': [u'JediArchives talk', self.namespaces[5]['_default']], + } + def version(self, code): return "1.5.3"
Modified: trunk/pywikipedia/families/wesolve_family.py =================================================================== --- trunk/pywikipedia/families/wesolve_family.py 2007-10-10 20:31:14 UTC (rev 4441) +++ trunk/pywikipedia/families/wesolve_family.py 2007-10-12 20:17:31 UTC (rev 4442) @@ -1,28 +1,29 @@ # -*- coding: utf-8 -*-
import urllib -import family,wikipedia +import family, wikipedia
-# The wikimedia family that is known as Wikibooks +# The wikimedia family that is known as Wesolve
class UploadDisabled(wikipedia.Error): """Uploads are disabled on this wiki"""
class Family(family.Family): - name = 'wesolve' def __init__(self): + family.Family.__init__(self) + self.name = 'wesolve' self.langs = {} for lang in ['en','it']: self._addlang(lang, - location = 'wesolveitnet.com', - namespaces = {-2: u'Media', + location = 'wesolveitnet.com', + namespaces = {-2: u'Media', -1: u'Special', 0: None, 1: u'Talk', 2: u'User', 3: u'User talk', 4: u'MozillaWiki', - 5: u'MozillaWiki talk', + 5: u'MozillaWiki talk', 6: u'Image', 7: u'Image talk', 8: u'MediaWiki', @@ -44,7 +45,9 @@ return '/wsiwiki/index.php?title='+name+"&redirect=no"
def references_address(self, code, name): - return "/wsiwiki/index.php?title=%s:Whatlinkshere&target=%s&limit=%d" % (self.special_namespace_url(code), name, config.special_page_limit) + return ("/wsiwiki/index.php?title=%s:Whatlinkshere&target=%s&limit=%d" + % (self.special_namespace_url(code), name, + config.special_page_limit))
def upload_address(self, code): raise UploadDisabled @@ -54,8 +57,9 @@ return ('/wsiwiki/index.php?title=%s:Maintenance&subfunction=' % self.special_namespace_url(code)) + maintenance_page else: - return ('/wsiwiki/index.php?title=%s:Maintenance&subfunction=' % - self.special_namespace_url(code)) + maintenance_page + '&limit=' + str(config.special_page_limit) + return (('/wsiwiki/index.php?title=%s:Maintenance&subfunction=' % + self.special_namespace_url(code)) + maintenance_page + + '&limit=' + str(config.special_page_limit))
def allmessages_address(self, code): return ("/wsiwiki/index.php?title=%s:Allmessages&ot=html" % @@ -73,8 +77,10 @@ return '/wsiwiki/index.php?title=%s&action=delete' % name
def version_history_address(self, code, name): - return '/wsiwiki/index.php?title=%s&action=history&limit=%d' % (name, config.special_page_limit) + return ('/wsiwiki/index.php?title=%s&action=history&limit=%d' + % (name, config.special_page_limit))
def export_address(self, code): - return '/wsiwiki/index.php?title=%s:Export' % self.special_namespace_url(code) + return ('/wsiwiki/index.php?title=%s:Export' + % self.special_namespace_url(code))
Russ, I think you may have made a mistake somewhere in wikipedia.py or pagegenerators.py.
I'm trying: "replace.py -lang:vi -family:wikipedia -filelinks:Image:Gtk-help.svg"
Replace: x By: y Rest default.
Immediate exit with: "'Page' object has no attribute 'usingPages'"
Could you please fix that?
Thanks
Siebrand
-----Oorspronkelijk bericht----- Van: pywikipedia-l-bounces@lists.wikimedia.org [mailto:pywikipedia-l-bounces@lists.wikimedia.org] Namens russblau@mayflower.knams.wikimedia.org Verzonden: vrijdag 12 oktober 2007 22:18 Aan: pywikipedia-l@lists.wikimedia.org Onderwerp: [Pywikipedia-l] SVN: [4442] trunk/pywikipedia/families
Revision: 4442 Author: russblau Date: 2007-10-12 20:17:31 +0000 (Fri, 12 Oct 2007)
Log Message: ----------- Fix logic errors and cleanup in two family files.
Modified Paths: -------------- trunk/pywikipedia/families/jediarchives_family.py trunk/pywikipedia/families/wesolve_family.py
Modified: trunk/pywikipedia/families/jediarchives_family.py =================================================================== --- trunk/pywikipedia/families/jediarchives_family.py 2007-10-10 20:31:14 UTC (rev 4441) +++ trunk/pywikipedia/families/jediarchives_family.py 2007-10-12 20:17:31 UTC (rev 4442) @@ -7,17 +7,17 @@ class Family(family.Family): def __init__(self): family.Family.__init__(self) - name = 'jediarchives' - self.langs = { + self.name = 'jediarchives' + self.langs = { 'en': 'jediarchives.info', - } - self.namespaces[4] = { - '_default': [u'JediArchives', self.namespaces[4]['_default']], - } - self.namespaces[5] = { - '_default': [u'JediArchives talk', self.namespaces[5]['_default']], - } - + } + self.namespaces[4] = { + '_default': [u'JediArchives', self.namespaces[4]['_default']], + } + self.namespaces[5] = { + '_default': [u'JediArchives talk', self.namespaces[5]['_default']], + } + def version(self, code): return "1.5.3"
Modified: trunk/pywikipedia/families/wesolve_family.py =================================================================== --- trunk/pywikipedia/families/wesolve_family.py 2007-10-10 20:31:14 UTC (rev 4441) +++ trunk/pywikipedia/families/wesolve_family.py 2007-10-12 20:17:31 UTC (rev 4442) @@ -1,28 +1,29 @@ # -*- coding: utf-8 -*-
import urllib -import family,wikipedia +import family, wikipedia
-# The wikimedia family that is known as Wikibooks +# The wikimedia family that is known as Wesolve
class UploadDisabled(wikipedia.Error): """Uploads are disabled on this wiki"""
class Family(family.Family): - name = 'wesolve' def __init__(self): + family.Family.__init__(self) + self.name = 'wesolve' self.langs = {} for lang in ['en','it']: self._addlang(lang, - location = 'wesolveitnet.com', - namespaces = {-2: u'Media', + location = 'wesolveitnet.com', + namespaces = {-2: u'Media', -1: u'Special', 0: None, 1: u'Talk', 2: u'User', 3: u'User talk', 4: u'MozillaWiki', - 5: u'MozillaWiki talk', + 5: u'MozillaWiki talk', 6: u'Image', 7: u'Image talk', 8: u'MediaWiki', @@ -44,7 +45,9 @@ return '/wsiwiki/index.php?title='+name+"&redirect=no"
def references_address(self, code, name): - return "/wsiwiki/index.php?title=%s:Whatlinkshere&target=%s&limit=%d" % (self.special_namespace_url(code), name, config.special_page_limit) + return ("/wsiwiki/index.php?title=%s:Whatlinkshere&target=%s&limit=%d" + % (self.special_namespace_url(code), name, + config.special_page_limit))
def upload_address(self, code): raise UploadDisabled @@ -54,8 +57,9 @@ return ('/wsiwiki/index.php?title=%s:Maintenance&subfunction=' % self.special_namespace_url(code)) + maintenance_page else: - return ('/wsiwiki/index.php?title=%s:Maintenance&subfunction=' % - self.special_namespace_url(code)) + maintenance_page + '&limit=' + str(config.special_page_limit) + return (('/wsiwiki/index.php?title=%s:Maintenance&subfunction=' % + self.special_namespace_url(code)) + maintenance_page + + '&limit=' + str(config.special_page_limit))
def allmessages_address(self, code): return ("/wsiwiki/index.php?title=%s:Allmessages&ot=html" % @@ -73,8 +77,10 @@ return '/wsiwiki/index.php?title=%s&action=delete' % name
def version_history_address(self, code, name): - return '/wsiwiki/index.php?title=%s&action=history&limit=%d' % (name, config.special_page_limit) + return ('/wsiwiki/index.php?title=%s&action=history&limit=%d' + % (name, config.special_page_limit))
def export_address(self, code): - return '/wsiwiki/index.php?title=%s:Export' % self.special_namespace_url(code) + return ('/wsiwiki/index.php?title=%s:Export' + % self.special_namespace_url(code))
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/pywikipedia-l