[Pywikipedia-svn] SVN: [7238] trunk/pywikipedia/cosmetic_changes.py
filnik at svn.wikimedia.org
filnik at svn.wikimedia.org
Sun Sep 13 10:39:45 UTC 2009
Revision: 7238
Author: filnik
Date: 2009-09-13 10:39:45 +0000 (Sun, 13 Sep 2009)
Log Message:
-----------
Bugfix by xqt, Feature Requests: 2711976
Modified Paths:
--------------
trunk/pywikipedia/cosmetic_changes.py
Modified: trunk/pywikipedia/cosmetic_changes.py
===================================================================
--- trunk/pywikipedia/cosmetic_changes.py 2009-09-13 10:35:02 UTC (rev 7237)
+++ trunk/pywikipedia/cosmetic_changes.py 2009-09-13 10:39:45 UTC (rev 7238)
@@ -423,8 +423,6 @@
def __init__(self, generator, acceptall = False):
self.generator = generator
self.acceptall = acceptall
- # Load default summary message.
- wikipedia.setAction(wikipedia.translate(wikipedia.getSite(), msg_standalone))
def treat(self, page):
try:
@@ -457,14 +455,22 @@
#page generator
gen = None
pageTitle = []
+ editSummary = ''
# This factory is responsible for processing command line arguments
# that are also used by other scripts and that determine on which pages
# to work on.
genFactory = pagegenerators.GeneratorFactory()
for arg in wikipedia.handleArgs():
+ if arg.startswith('-summary:'):
+ editSummary = arg[len('-summary:'):]
+ else:
if not genFactory.handleArg(arg):
pageTitle.append(arg)
+ if editSummary == '':
+ # Load default summary message.
+ editSummary = wikipedia.translate(wikipedia.getSite(), msg_standalone)
+ wikipedia.setAction(editSummary)
# Disabled this check. Although the point is still valid, there
# is now a warning and a prompt (see below).
More information about the Pywikipedia-svn
mailing list