Revision: 7710
Author:   alexsh
Date:     2009-11-28 22:35:07 +0000 (Sat, 28 Nov 2009)

Log Message:
-----------
input options selection: input?\226?\134?\146inputChoice

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

Modified: trunk/pywikipedia/category.py
===================================================================
--- trunk/pywikipedia/category.py       2009-11-28 20:34:05 UTC (rev 7709)
+++ trunk/pywikipedia/category.py       2009-11-28 22:35:07 UTC (rev 7710)
@@ -338,8 +338,7 @@
     '''A robot to mass-add a category to a list of pages.'''
     site = pywikibot.getSite()
     if gen:
-        newcatTitle = pywikibot.input(
-            u'Category to add (do not give namespace):')
+        newcatTitle = pywikibot.input(u'Category to add (do not give 
namespace):')
         if not site.nocapitalize:
             newcatTitle = newcatTitle[:1].capitalize() + newcatTitle[1:]
 
@@ -354,13 +353,13 @@
                 answer = ''
 
             while answer not in ('y','n','a'):
-                answer = pywikibot.input(u'%s [y/n/a(ll)]:' % (page.aslink()))
+                answer = pywikibot.inputChoice(u'%s'% (page.aslink()),  
['Yes', 'No', 'All'],['y', 'n', 'a'], 'n')
                 if answer == 'a':
                     confirm = ''
                     while confirm not in ('y','n'):
-                        confirm = pywikibot.input(u"""\
+                        confirm = pywikibot.inputChoice(u"""\
 This should be used if and only if you are sure that your links are correct!
-Are you sure? [y/n]:""")
+Are you sure?""", ['Yes', 'No'], ['y', 'n'], 'n')
                     if confirm == 'n':
                         answer = ''
 
@@ -729,7 +728,7 @@
         flag = False
         while not flag:
             print ''
-            choice = pywikibot.input(u'Choice:')
+            choice = pywikibot.inputChoice(u'Choice:', ['jump', 'skip', 
'remove', 'print'], ['j', 's', 'r', '?'], 's')
             if choice in ['s', 'S']:
                 flag = True
             elif choice == '':



_______________________________________________
Pywikipedia-svn mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-svn

Reply via email to