http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10349
Revision: 10349 Author: xqt Date: 2012-06-12 07:29:31 +0000 (Tue, 12 Jun 2012) Log Message: ----------- cosmetic_changes_enable/disable dict enabled in r10336; here is the doc from trunk
Modified Paths: -------------- branches/rewrite/scripts/cosmetic_changes.py
Modified: branches/rewrite/scripts/cosmetic_changes.py =================================================================== --- branches/rewrite/scripts/cosmetic_changes.py 2012-06-11 23:03:00 UTC (rev 10348) +++ branches/rewrite/scripts/cosmetic_changes.py 2012-06-12 07:29:31 UTC (rev 10349) @@ -26,12 +26,30 @@
cosmetic_changes = True
+You may enable cosmetic changes for additional languages by adding the +dictionary cosmetic_changes_enable to your user-config.py. It should contain +a tuple of languages for each site where you wish to enable in addition to +your own langlanguage if cosmetic_changes_mylang_only is True (see below). +Please set your dictionary by adding such lines to your user-config.py: + + cosmetic_changes_enable['wikipedia'] = ('de', 'en', 'fr') + There is another config variable: You can set
cosmetic_changes_mylang_only = False
if you're running a bot on multiple sites and want to do cosmetic changes on all of them, but be careful if you do. + +You may disable cosmetic changes by adding the all unwanted languages to the +dictionary cosmetic_changes_disable in your user-config.py. It should contain +a tuple of languages for each site where you wish to disable cosmetic changes. +You may use it with cosmetic_changes_mylang_only is False, but you can also +disable your own language. This also overrides the settings in the dictionary +cosmetic_changes_enable. Please set this dictionary by adding such lines to +your user-config.py: + + cosmetic_changes_disable['wikipedia'] = ('de', 'en', 'fr') """ # # (C) xqt, 2009-2012 @@ -716,8 +734,7 @@ if self.done: break self.treat(page) except KeyboardInterrupt: - raise - #pywikibot.output('\nQuitting program...') + pywikibot.output('\nQuitting program...')
def main():