[Pywikipedia-l] SVN: [4654] trunk/pywikipedia/pagegenerators.py

filnik at svn.wikimedia.org filnik at svn.wikimedia.org
Sun Dec 9 13:23:22 UTC 2007


Revision: 4654
Author:   filnik
Date:     2007-12-09 13:23:16 +0000 (Sun, 09 Dec 2007)

Log Message:
-----------
Adding newImages() in the GenFactory class

Modified Paths:
--------------
    trunk/pywikipedia/pagegenerators.py

Modified: trunk/pywikipedia/pagegenerators.py
===================================================================
--- trunk/pywikipedia/pagegenerators.py	2007-12-09 13:04:42 UTC (rev 4653)
+++ trunk/pywikipedia/pagegenerators.py	2007-12-09 13:23:16 UTC (rev 4654)
@@ -772,6 +772,12 @@
                 if namespace:
                     prefix = prefix[colon+1:]
             gen = PrefixingPageGenerator(prefix = prefix, namespace = namespace)
+        elif arg.startswith('-newimages'):
+            if len(arg) == 10:
+                limit = wikipedia.input(u'How many images do you want to check?')
+            else:
+                limit = arg[11:]
+            gen = newImages(limit, wikipedia.getSite())
         elif arg.startswith('-new'):
             if len(arg) >=5:
               gen = NewpagesPageGenerator(number = int(arg[5:]))





More information about the Pywikipedia-l mailing list