[Pywikipedia-l] SVN: [6230] branches/rewrite/pywikibot
russblau at svn.wikimedia.org
russblau at svn.wikimedia.org
Thu Jan 8 16:20:28 UTC 2009
Revision: 6230
Author: russblau
Date: 2009-01-08 16:20:27 +0000 (Thu, 08 Jan 2009)
Log Message:
-----------
Grudgingly support setAction() for backwards-compatibility.
Modified Paths:
--------------
branches/rewrite/pywikibot/__init__.py
branches/rewrite/pywikibot/config2.py
Modified: branches/rewrite/pywikibot/__init__.py
===================================================================
--- branches/rewrite/pywikibot/__init__.py 2009-01-08 16:13:30 UTC (rev 6229)
+++ branches/rewrite/pywikibot/__init__.py 2009-01-08 16:20:27 UTC (rev 6230)
@@ -105,6 +105,11 @@
link_regex = re.compile(r'\[\[(?P<title>[^\]|[#<>{}]*)(\|.*?)?\]\]')
+def setAction(s):
+ """Set a summary to use for changed page submissions"""
+ config.default_edit_summary = s
+
+
def set_debug(layer):
"""Set the logger for specified layer to DEBUG level.
Modified: branches/rewrite/pywikibot/config2.py
===================================================================
--- branches/rewrite/pywikibot/config2.py 2009-01-08 16:13:30 UTC (rev 6229)
+++ branches/rewrite/pywikibot/config2.py 2009-01-08 16:20:27 UTC (rev 6230)
@@ -72,6 +72,11 @@
# By default you are asked for a password on the terminal.
password_file = None
+# edit summary to use if not supplied by bot script
+# WARNING: this should NEVER be used in practice, ALWAYS supply a more
+# relevant summary for bot edits
+default_edit_summary = u'Wikipedia python library v.2'
+
# Get the names of all known families, and initialize
# with empty dictionaries
def _get_base_dir():
More information about the Pywikipedia-l
mailing list