http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10346
Revision: 10346 Author: xqt Date: 2012-06-11 05:35:41 +0000 (Mon, 11 Jun 2012) Log Message: ----------- exclude the "K?\195?\169p" -> "F?\195?\161jl" replacements on hu-wiki per request https://hu.wikipedia.org/wiki/WP:KF-JA#F.C3.A1jl_vs._K.C3.A9p, update from rewrite r10345
Modified Paths: -------------- trunk/pywikipedia/cosmetic_changes.py
Modified: trunk/pywikipedia/cosmetic_changes.py =================================================================== --- trunk/pywikipedia/cosmetic_changes.py 2012-06-11 05:34:45 UTC (rev 10345) +++ trunk/pywikipedia/cosmetic_changes.py 2012-06-11 05:35:41 UTC (rev 10346) @@ -141,6 +141,7 @@ } }
+ class CosmeticChangesToolkit: def __init__(self, site, debug=False, redirect=False, namespace=None, pageTitle=None): @@ -360,6 +361,11 @@ for image in [u'Image', u'image']: if image in namespaces: namespaces.remove(image) + if self.site.lang == 'hu': + # do not change "Kép" on hu-wiki + for image in [u'Kép', u'kép']: + if image in namespaces: + namespaces.remove(image) elif self.site.lang == 'pt': # bug #3346901 should be implemented continue @@ -805,6 +811,7 @@ r'\1== {{int:license}} ==', exceptions, True) return text
+ class CosmeticChangesBot: def __init__(self, generator, acceptall=False, comment=u'Robot: Cosmetic changes', async=False): @@ -862,6 +869,7 @@ except KeyboardInterrupt: pywikibot.output('\nQuitting program...')
+ def main(): #page generator gen = None