xqt | 1 Nov 18:42 2011
Picon

SVN: [9718] trunk/pywikipedia

http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9718

Revision: 9718
Author:   xqt
Date:     2011-11-01 17:42:10 +0000 (Tue, 01 Nov 2011)
Log Message:
-----------
update family files,fix for bug #3431987

Modified Paths:
--------------
    trunk/pywikipedia/families/wikipedia_family.py
    trunk/pywikipedia/family.py

Modified: trunk/pywikipedia/families/wikipedia_family.py
===================================================================
--- trunk/pywikipedia/families/wikipedia_family.py	2011-10-31 18:57:33 UTC (rev 9717)
+++ trunk/pywikipedia/families/wikipedia_family.py	2011-11-01 17:42:10 UTC (rev 9718)
 <at>  <at>  -46,8 +46,8  <at>  <at> 
             self.langs = dict([(lang, '%s.wikipedia.org' % lang) for lang in self.languages_by_size])

         # Override defaults
-        self.namespaces[2]['cs'] = u'Wikipedista'
-        self.namespaces[3]['cs'] = u'Diskuse s wikipedistou'
+        self.namespaces[2]['cs'] = [u'Wikipedista', u'Uživatel', u'Wikipedistka', u'Uživatelka']
+        self.namespaces[3]['cs'] = [u'Diskuse s wikipedistou', u'Diskuse s uživatelem', u'Diskuse s
wikipedistkou', u'Wikipedista diskuse', u'Wikipedistka diskuse', u'Diskuse s uživatelkou',
u'Uživatel diskuse', u'Uživatelka diskuse']
         self.namespaces[9]['da'] = u'MediaWiki-diskussion'
         self.namespaces[13]['da'] = u'Hjælp-diskussion'
(Continue reading)

jhsoby | 2 Nov 04:35 2011
Picon

SVN: [9719] trunk/pywikipedia/featured.py

http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9719

Revision: 9719
Author:   jhsoby
Date:     2011-11-02 03:35:20 +0000 (Wed, 02 Nov 2011)
Log Message:
-----------
Adding name of Norwegian featured list template

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

Modified: trunk/pywikipedia/featured.py
===================================================================
--- trunk/pywikipedia/featured.py	2011-11-01 17:42:10 UTC (rev 9718)
+++ trunk/pywikipedia/featured.py	2011-11-02 03:35:20 UTC (rev 9719)
 <at>  <at>  -122,6 +122,7  <at>  <at> 

 template_lists = {
     '_default': ['Link FL'],
+    'no': ['Link GL'],
 }

 featured_name = {
jhsoby | 2 Nov 04:46 2011
Picon

SVN: [9720] trunk/pywikipedia/featured.py

http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9720

Revision: 9720
Author:   jhsoby
Date:     2011-11-02 03:46:45 +0000 (Wed, 02 Nov 2011)
Log Message:
-----------
Fix typo introduced in r7535, not apparent until the GL template name for no was added

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

Modified: trunk/pywikipedia/featured.py
===================================================================
--- trunk/pywikipedia/featured.py	2011-11-02 03:35:20 UTC (rev 9719)
+++ trunk/pywikipedia/featured.py	2011-11-02 03:46:45 UTC (rev 9720)
 <at>  <at>  -420,7 +420,7  <at>  <at> 
     elif pType == 'list':
         try:
             templates = template_lists[lang]
-            templatest += template_lists['_default']
+            templates += template_lists['_default']
         except KeyError:
             templates = template_lists['_default']
     else: #pType in ['former', 'featured']
jhsoby | 2 Nov 05:33 2011
Picon

SVN: [9721] trunk/pywikipedia/date.py

http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9721

Revision: 9721
Author:   jhsoby
Date:     2011-11-02 04:33:50 +0000 (Wed, 02 Nov 2011)
Log Message:
-----------
Adding years in date.py for Northern Sotho (nso:)

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

Modified: trunk/pywikipedia/date.py
===================================================================
--- trunk/pywikipedia/date.py	2011-11-02 03:46:45 UTC (rev 9720)
+++ trunk/pywikipedia/date.py	2011-11-02 04:33:50 UTC (rev 9721)
 <at>  <at>  -549,6 +549,7  <at>  <at> 
         'nl' :      lambda v: dh_number( v, u'%d (getal)' ),
         'nn' :      lambda v: dh_number( v, u'Talet %d' ),
         'no' :      lambda v: dh_number( v, u'%d (tall)' ),
+        'nso' :     lambda v: dh_number( v, u'%d (nomoro)' ),
         'pl' :      lambda v: dh_number( v, u'%d (liczba)' ),
         'ro' :      lambda v: dh_number( v, u'%d (cifră)' ),
         'ru' :      lambda v: dh_number( v, u'%d (число)' ),
 <at>  <at>  -638,6 +639,7  <at>  <at> 
         'nl' :      dh_simpleYearAD,
         'nn' :      dh_simpleYearAD,
         'no' :      dh_simpleYearAD,
+        'nso' :     dh_simpleYearAD,
(Continue reading)

xqt | 2 Nov 07:40 2011
Picon

SVN: [9722] trunk/pywikipedia/date.py

http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9722

Revision: 9722
Author:   xqt
Date:     2011-11-02 06:40:19 +0000 (Wed, 02 Nov 2011)
Log Message:
-----------
use abs() function

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

Modified: trunk/pywikipedia/date.py
===================================================================
--- trunk/pywikipedia/date.py	2011-11-02 04:33:50 UTC (rev 9721)
+++ trunk/pywikipedia/date.py	2011-11-02 06:40:19 UTC (rev 9722)
 <at>  <at>  -1696,7 +1696,6  <at>  <at> 
 formatLimits = {
     'MonthName'         : (lambda v: 1 <=v and v < 13,                 1, 13),
     'Number'            : (lambda v: 0 <=v and v < 1000000,            0, 1001),
-
     'YearAD'            : (lambda v: 0 <=v and v < 2501,               0, 2501),
     'YearBC'            : (lambda v: 0 <=v and v < 4001,               0, 501),   # zh: has years as old as 前1700年
     'DecadeAD'          : (lambda v: 0 <=v and v < 2501,               0, 2501),  # At some point need to re-add  "and v%10==0" to the limitation
 <at>  <at>  -1766,10 +1765,7  <at>  <at> 

 
 def formatYear(lang, year):
-    if year < 0:
(Continue reading)

xqt | 2 Nov 13:18 2011
Picon

SVN: [9723] trunk/pywikipedia/date.py

http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9723

Revision: 9723
Author:   xqt
Date:     2011-11-02 12:18:32 +0000 (Wed, 02 Nov 2011)
Log Message:
-----------
revert r9722

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

Modified: trunk/pywikipedia/date.py
===================================================================
--- trunk/pywikipedia/date.py	2011-11-02 06:40:19 UTC (rev 9722)
+++ trunk/pywikipedia/date.py	2011-11-02 12:18:32 UTC (rev 9723)
 <at>  <at>  -1696,6 +1696,7  <at>  <at> 
 formatLimits = {
     'MonthName'         : (lambda v: 1 <=v and v < 13,                 1, 13),
     'Number'            : (lambda v: 0 <=v and v < 1000000,            0, 1001),
+
     'YearAD'            : (lambda v: 0 <=v and v < 2501,               0, 2501),
     'YearBC'            : (lambda v: 0 <=v and v < 4001,               0, 501),   # zh: has years as old as 前1700年
     'DecadeAD'          : (lambda v: 0 <=v and v < 2501,               0, 2501),  # At some point need to re-add  "and v%10==0" to the limitation
 <at>  <at>  -1765,7 +1766,10  <at>  <at> 

 
 def formatYear(lang, year):
-    return formats['YearBC'][lang](abs(year))
(Continue reading)

a_engels | 3 Nov 08:13 2011
Picon

SVN: [9724] trunk/pywikipedia/wikipedia.py

http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9724

Revision: 9724
Author:   a_engels
Date:     2011-11-03 07:13:50 +0000 (Thu, 03 Nov 2011)
Log Message:
-----------
bugfix: bot incorrectly noted edit conflicts on semiprotected pages

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

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2011-11-02 12:18:32 UTC (rev 9723)
+++ trunk/pywikipedia/wikipedia.py	2011-11-03 07:13:50 UTC (rev 9724)
 <at>  <at>  -1742,7 +1742,7  <at>  <at> 
             #       self.get() calls self._getEditPage without this parameter
             self.get(force=True, change_edit_time=True)
             newtime = self.editTime()
-            if oldtime != newtime: # page was changed
+            if str(oldtime) != str(newtime): # page was changed
                 raise EditConflict(u'Page has been changed after first read.')
             self._editrestriction = False
         # If no comment is given for the change, use the default
xqt | 4 Nov 15:50 2011
Picon

SVN: [9725] trunk/pywikipedia/wikipedia.py

http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9725

Revision: 9725
Author:   xqt
Date:     2011-11-04 14:50:26 +0000 (Fri, 04 Nov 2011)
Log Message:
-----------
python 2.4 compatible (bug #3419295)

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

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2011-11-03 07:13:50 UTC (rev 9724)
+++ trunk/pywikipedia/wikipedia.py	2011-11-04 14:50:26 UTC (rev 9725)
 <at>  <at>  -4437,7 +4437,7  <at>  <at> 
     # TODO: why isn't this a Site method?
     pages = list(pages)  # if pages is an iterator, we need to make it a list
     output(u'Getting %d pages %sfrom %s...'
-           % (len(pages), u'via API ' if site.has_api() and debug else u'', site))
+           % (len(pages), (u'', u'via API ')[site.has_api() and debug]))
     limit = config.special_page_limit / 4 # default is 500/4, but It might have good point for server.
     if len(pages) > limit:
         # separate export pages for bulk-retrieve
valhallasw | 5 Nov 14:57 2011
Picon

SVN: [9726] trunk/pywikipedia/wikipedia.py

http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9726

Revision: 9726
Author:   valhallasw
Date:     2011-11-05 13:57:45 +0000 (Sat, 05 Nov 2011)
Log Message:
-----------
critical fix: revert r9725

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

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2011-11-04 14:50:26 UTC (rev 9725)
+++ trunk/pywikipedia/wikipedia.py	2011-11-05 13:57:45 UTC (rev 9726)
 <at>  <at>  -4437,7 +4437,7  <at>  <at> 
     # TODO: why isn't this a Site method?
     pages = list(pages)  # if pages is an iterator, we need to make it a list
     output(u'Getting %d pages %sfrom %s...'
-           % (len(pages), (u'', u'via API ')[site.has_api() and debug]))
+           % (len(pages), u'via API ' if site.has_api() and debug else u'', site))
     limit = config.special_page_limit / 4 # default is 500/4, but It might have good point for server.
     if len(pages) > limit:
         # separate export pages for bulk-retrieve
xqt | 7 Nov 05:35 2011
Picon

SVN: [9727] trunk/pywikipedia/wikipedia.py

http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9727

Revision: 9727
Author:   xqt
Date:     2011-11-07 04:35:05 +0000 (Mon, 07 Nov 2011)
Log Message:
-----------
python 2.4 compatible (bug #3419295), follow up for r9725, r9726

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

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2011-11-05 13:57:45 UTC (rev 9726)
+++ trunk/pywikipedia/wikipedia.py	2011-11-07 04:35:05 UTC (rev 9727)
 <at>  <at>  -4437,7 +4437,7  <at>  <at> 
     # TODO: why isn't this a Site method?
     pages = list(pages)  # if pages is an iterator, we need to make it a list
     output(u'Getting %d pages %sfrom %s...'
-           % (len(pages), u'via API ' if site.has_api() and debug else u'', site))
+           % (len(pages), (u'', u'via API ')[site.has_api() and debug], site))
     limit = config.special_page_limit / 4 # default is 500/4, but It might have good point for server.
     if len(pages) > limit:
         # separate export pages for bulk-retrieve

Gmane