Revision: 7581
Author: a_engels
Date: 2009-11-02 18:34:37 +0000 (Mon, 02 Nov 2009)
Log Message:
-----------
I got an error here; throwing a try...catch around it
Modified Paths:
--------------
trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py
===================================================================
--- trunk/pywikipedia/interwiki.py 2009-11-02 17:38:54 UTC (rev 7580)
+++ trunk/pywikipedia/interwiki.py 2009-11-02 18:34:37 UTC (rev 7581)
@@ -870,7 +870,10 @@
return False
if globalvar.nobackonly:
if page == self.originPage:
- pywikibot.output(u"%s has a backlink from %s."%(page,linkingPage))
+ try:
+ pywikibot.output(u"%s has a backlink from %s."%(page,linkingPage))
+ except UnicodeDecodeError:
+ pywikibot.output(u"Found a backlink for a page.")
self.makeForcedStop(counter)
return False
Revision: 7579
Author: xqt
Date: 2009-11-02 14:38:10 +0000 (Mon, 02 Nov 2009)
Log Message:
-----------
correcting usage of decimals in hours-option
Modified Paths:
--------------
trunk/pywikipedia/clean_sandbox.py
Modified: trunk/pywikipedia/clean_sandbox.py
===================================================================
--- trunk/pywikipedia/clean_sandbox.py 2009-11-01 10:21:50 UTC (rev 7578)
+++ trunk/pywikipedia/clean_sandbox.py 2009-11-02 14:38:10 UTC (rev 7579)
@@ -6,8 +6,8 @@
This script understands the following command-line arguments:
-hours:# Use this parameter if to make the script repeat itself
- after # hours. Hours can be defined as a decimal. 0.001
- hours is one second.
+ after # hours. Hours can be defined as a decimal. 0.01
+ hours are 36 seconds; 0.1 are 6 minutes.
"""
#
@@ -53,7 +53,7 @@
'ar': u'روبوت: هذه الصفحة سيتم تفريغها تلقائيا',
'cs': u'Uhrabání pískoviště',
'da': u'Bot: Nyt sand (fra[[Skabelon:Sandkasse tekst]])',
- 'de': u'Bot: Setze Seite zurück.',
+ 'de': u'Bot: Setze Spielwiese zurück.',
'en': u'Robot: Automatically cleaned',
'fi': u'Botti siivosi hiekkalaatikon.',
'he': u'בוט: דף זה ינוקה אוטומטית.',
Revision: 7577
Author: a_engels
Date: 2009-11-01 09:52:00 +0000 (Sun, 01 Nov 2009)
Log Message:
-----------
When using the -cat (and similar) command-line arguments, if one wants to start the category somewhere in the middle, allow usage of # instead of |. I prefer # because | already has a meaning on the command line, and thus can only be used with quotation marks as escape.
Modified Paths:
--------------
trunk/pywikipedia/pagegenerators.py
Modified: trunk/pywikipedia/pagegenerators.py
===================================================================
--- trunk/pywikipedia/pagegenerators.py 2009-10-31 00:35:16 UTC (rev 7576)
+++ trunk/pywikipedia/pagegenerators.py 2009-11-01 09:52:00 UTC (rev 7577)
@@ -18,22 +18,23 @@
parameterHelp = """\
-cat Work on all pages which are in a specific category.
Argument can also be given as "-cat:categoryname" or
- as "-cat:categoryname|fromtitle".
+ as "-cat:categoryname#fromtitle" (using | instead of #
+ is also allowed in this one and the following)
-catr Like -cat, but also recursively includes pages in
subcategories, sub-subcategories etc. of the
given category.
Argument can also be given as "-catr:categoryname" or
- as "-catr:categoryname|fromtitle".
+ as "-catr:categoryname#fromtitle".
-subcats Work on all subcategories of a specific category.
Argument can also be given as "-subcats:categoryname" or
- as "-subcats:categoryname|fromtitle".
+ as "-subcats:categoryname#fromtitle".
-subcatsr Like -subcats, but also includes sub-subcategories etc. of
the given category.
Argument can also be given as "-subcatsr:categoryname" or
- as "-subcatsr:categoryname|fromtitle".
+ as "-subcatsr:categoryname#fromtitle".
-uncat Work on all pages which are not categorised.
@@ -925,7 +926,7 @@
categoryname = wikipedia.input(u'Please enter the category name:')
else:
categoryname = arg[length + 1:]
-
+ categoryname = categoryname.replace('#', '|')
ind = categoryname.find('|')
startfrom = None
if ind > 0: