http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10327
Revision: 10327 Author: xqt Date: 2012-06-08 12:39:36 +0000 (Fri, 08 Jun 2012) Log Message: ----------- revert r10291 since fix was done with r10326
Modified Paths: -------------- branches/rewrite/scripts/cosmetic_changes.py
Modified: branches/rewrite/scripts/cosmetic_changes.py =================================================================== --- branches/rewrite/scripts/cosmetic_changes.py 2012-06-08 12:08:53 UTC (rev 10326) +++ branches/rewrite/scripts/cosmetic_changes.py 2012-06-08 12:39:36 UTC (rev 10327) @@ -124,6 +124,7 @@ } }
+ class CosmeticChangesToolkit: def __init__(self, site, debug=False, redirect=False, namespace=None, pageTitle=None): @@ -145,13 +146,13 @@ text = self.fixSelfInterwiki(text) text = self.standardizePageFooter(text) text = self.fixSyntaxSave(text) -## text = self.cleanUpLinks(text) #module object has no attribute url2unicode + text = self.cleanUpLinks(text) text = self.cleanUpSectionHeaders(text) text = self.putSpacesInLists(text) ## text = self.translateAndCapitalizeNamespaces(text) ##excluded since family.namespaces does not exist anymore ## text = self.translateMagicWords(text) text = self.replaceDeprecatedTemplates(text) -## text = self.resolveHtmlEntities(text) + text = self.resolveHtmlEntities(text) text = self.validXhtml(text) text = self.removeUselessSpaces(text) text = self.removeNonBreakingSpaceBeforePercent(text) @@ -656,6 +657,7 @@ r'\1== {{int:license}} ==', exceptions, True) return text
+ class CosmeticChangesBot: def __init__(self, generator, acceptall=False, comment=u'Robot: Cosmetic changes', async=False): @@ -712,6 +714,7 @@ raise #pywikibot.output('\nQuitting program...')
+ def main(): #page generator gen = None