Revision: 8229
Author: xqt
Date: 2010-05-29 11:02:47 +0000 (Sat, 29 May 2010)
Log Message:
-----------
show scripts options from pagegenewrators (bugfix for #3008448), use -page from
pagegenerators lib
Modified Paths:
--------------
trunk/pywikipedia/fixing_redirects.py
Modified: trunk/pywikipedia/fixing_redirects.py
===================================================================
--- trunk/pywikipedia/fixing_redirects.py 2010-05-28 17:32:37 UTC (rev 8228)
+++ trunk/pywikipedia/fixing_redirects.py 2010-05-29 11:02:47 UTC (rev 8229)
@@ -5,9 +5,10 @@
links in featured pages or only one page of each wiki.
Can be using with:
--featured Run over featured pages
--page:XXX Run over only one page
+¶ms;
+-featured Run over featured pages
+
Run fixing_redirects.py -help to see all the command-line
options -file, -ref, -links, ...
@@ -186,7 +187,6 @@
def main():
start = '!'
featured = False
- title = None
namespace = None
gen = None
@@ -198,11 +198,6 @@
for arg in wikipedia.handleArgs():
if arg == '-featured':
featured = True
- elif arg.startswith('-page'):
- if len(arg) == 5:
- title = wikipedia.input(u'Which page should be processed?')
- else:
- title = arg[6:]
elif arg.startswith('-namespace'):
if len(arg) == 10:
namespace = int(wikipedia.input(u'Which namespace should be
processed?'))
@@ -226,9 +221,6 @@
generator = pagegenerators.NamespaceFilterPageGenerator(gen, [0])
for page in generator:
workon(page)
- elif title is not None:
- page = wikipedia.Page(wikipedia.getSite(), title)
- workon(page)
elif namespace is not None:
for page in pagegenerators.AllpagesPageGenerator(start=start,
namespace=namespace, includeredirects=False):
workon(page)
Show replies by date