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:
Show replies by date