Revision: 3900 Author: wikipedian Date: 2007-07-26 13:06:28 +0000 (Thu, 26 Jul 2007)
Log Message: ----------- Deleted class XmlPage. I tagged this as delete-me long ago, and it is unused and a really, really bad idea.
Modified Paths: -------------- trunk/pywikipedia/family.py trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/family.py =================================================================== --- trunk/pywikipedia/family.py 2007-07-25 21:33:20 UTC (rev 3899) +++ trunk/pywikipedia/family.py 2007-07-26 13:06:28 UTC (rev 3900) @@ -2578,9 +2578,6 @@ def withoutinterwiki_address(self, code, limit=500): return "%s?title=%s:Withoutinterwiki&limit=%d" % (self.path(code), self.special_namespace_url(code), limit)
- def linksearch_address(self, code, url, limit=500): - return "%s?title=%s:Linksearch&target=%s&limit=%d" % (self.path(code), self.special_namespace_url(code), url, limit) - def code2encoding(self, code): """Return the encoding for a specific language wiki""" return 'utf-8'
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2007-07-25 21:33:20 UTC (rev 3899) +++ trunk/pywikipedia/wikipedia.py 2007-07-26 13:06:28 UTC (rev 3900) @@ -2162,30 +2162,6 @@ result.append(Page(self.site(), match.group('title'))) return result
-class XmlPage(Page): - # In my opinion, this should be deleted. --Daniel Herding - '''A subclass of Page that wraps an XMLEntry object (from xmlreader.py). - - Sample usage: - >>> source = xmlreader.XmlDump(some_file_name) - >>> for entry in source.parse(): - ... page = XmlPage(getSite(), entry) - ... # do something with page... - ''' - - def __init__(self, site, xmlentry): - if not isinstance(xmlentry, xmlreader.XmlEntry): - raise TypeError("Invalid argument to XmlPage constructor.") - Page.__init__(self, site, xmlentry.title) - self.editRestriction = xmlentry.editRestriction - self.moveRestriction = xmlentry.moveRestriction - self._contents = xmlentry.text - self._xml = xmlentry # save XML source in case we need it later - m = self.site().redirectRegex().match(self._contents) - if m: - self._redirarg = m.group(1) - self._getexception = IsRedirectPage - class GetAll(object): def __init__(self, site, pages, throttle, force): """First argument is Site object.