Revision: 3927
Author: leogregianin
Date: 2007-07-31 16:03:31 +0000 (Tue, 31 Jul 2007)
Log Message:
-----------
Fix bug 1668061: Harmonize category.py's keybindings
Modified Paths:
--------------
trunk/pywikipedia/category.py
Modified: trunk/pywikipedia/category.py
===================================================================
--- trunk/pywikipedia/category.py 2007-07-31 12:17:29 UTC (rev 3926)
+++ trunk/pywikipedia/category.py 2007-07-31 16:03:31 UTC (rev 3927)
@@ -568,7 +568,7 @@
# layout: we don't expect a cat to have more than 100 subcats
wikipedia.output(u'%2d - Move down to %s' % (i, subcatlist[i].title()))
print ' j - Jump to another category'
- print ' n - Skip this article'
+ print ' s - Skip this article'
print ' r - Remove this category tag'
print ' ? - Print first part of the page (longer and longer)'
wikipedia.output(u'Enter - Save category as %s' % current_cat.title())
@@ -577,7 +577,7 @@
while not flag:
print ''
choice=wikipedia.input(u'Choice:')
- if choice == 'n':
+ if choice in ['s', 'S']:
flag = True
elif choice == '':
wikipedia.output(u'Saving category as %s' % current_cat.title())
@@ -586,13 +586,13 @@
else:
catlib.change_category(article, original_cat, current_cat)
flag = True
- elif choice == 'j':
+ elif choice in ['j', 'J']:
newCatTitle = wikipedia.input(u'Please enter the category the article should be moved to:')
newCat = catlib.Category(wikipedia.getSite(), 'Category:' + newCatTitle)
# recurse into chosen category
self.move_to_category(article, original_cat, newCat)
flag = True
- elif choice == 'r':
+ elif choice in ['r', 'R']:
# remove the category tag
catlib.change_category(article, original_cat, None)
flag = True
Revision: 3926
Author: wikipedian
Date: 2007-07-31 12:17:29 +0000 (Tue, 31 Jul 2007)
Log Message:
-----------
translate namespaces, so that when you run this:
python interwiki.py -lang:de "Kategorie:Tour de France" -hint:fr
the bot will not load [[fr:Kategorie:Tour de France]], but
[[fr:Cat?\195?\169gorie:Tour de France]].
Modified Paths:
--------------
trunk/pywikipedia/titletranslate.py
Modified: trunk/pywikipedia/titletranslate.py
===================================================================
--- trunk/pywikipedia/titletranslate.py 2007-07-29 22:18:58 UTC (rev 3925)
+++ trunk/pywikipedia/titletranslate.py 2007-07-31 12:17:29 UTC (rev 3926)
@@ -31,7 +31,12 @@
# if given as -hint:xy or -hint:xy:, assume that there should
# be a page in language xy with the same title as the page
# we're currently working on
- newname = page.title()
+ ns = page.namespace()
+ if ns:
+ newname = u'%s:%s' % (site.family.namespace('_default', ns), page.titleWithoutNamespace())
+ else:
+ # article in the main namespace
+ newname = page.title()
try:
number = int(codes)
codes = site.family.languages_by_size[:number]
After moving the mailing list, I recieved two reports of people who would
like to split the list into a discussion list and a list that reports SVN
updates.
When recieving the mails it is, of course, possible to filter client-side
at '[Pywikipedia-l] SVN: [', and as the entire list is reasonably
low-volume, that should be possible for modem users.
This would be my preferred system, but I would like to hear (read) some
comments on splitting the list into a development list (which would
probably be pywikipedia-l@wikimedia) and a discussion list (which would
then be pywikipediabot-users@sourceforge or a new list@wikimedia).
Thanks in advance for your responses,
valhallasw