xqt | 4 May 07:13 2010
Picon

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

Revision: 8141
Author:   xqt
Date:     2010-05-04 05:13:35 +0000 (Tue, 04 May 2010)

Log Message:
-----------
deactivate API query due to bugs #2995997 and #2995320

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

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2010-04-29 13:57:22 UTC (rev 8140)
+++ trunk/pywikipedia/wikipedia.py	2010-05-04 05:13:35 UTC (rev 8141)
 <at>  <at>  -2173,12 +2173,10  <at>  <at> 
         category links in the page text.

         """
-#  New add API query.
-
-#   api.php?action=query&prop=categories&titles=Albert%20Einstein
-
-#
-        if not self.site().has_api():
+        # New API query.
+        # api.php?action=query&prop=categories&titles=Albert%20Einstein
+        # deactivated due to bug 2995320 & 2995997
+        if not self.site().has_api() or True:
(Continue reading)

shizhao | 4 May 15:32 2010
Picon

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

Revision: 8142
Author:   shizhao
Date:     2010-05-04 13:32:57 +0000 (Tue, 04 May 2010)

Log Message:
-----------
categories() compatible old non-api style. bug 2995320 & 2995997 no fixed.

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

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2010-05-04 05:13:35 UTC (rev 8141)
+++ trunk/pywikipedia/wikipedia.py	2010-05-04 13:32:57 UTC (rev 8142)
 <at>  <at>  -2163,7 +2163,9  <at>  <at> 
         self._interwikis = result
         return result

-    def categories(self, get_redirect=False):
+
+
+    def categories(self, get_redirect=False,api=False):
         """Return a list of categories that the article is in.

         This will retrieve the page text to do its work, so it can raise
 <at>  <at>  -2171,49 +2173,52  <at>  <at> 

         The return value is a list of Category objects, one for each of the
(Continue reading)

shizhao | 4 May 16:43 2010
Picon

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

Revision: 8143
Author:   shizhao
Date:     2010-05-04 14:43:03 +0000 (Tue, 04 May 2010)

Log Message:
-----------
bug 2995320 & 2995997 fixed

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

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2010-05-04 13:32:57 UTC (rev 8142)
+++ trunk/pywikipedia/wikipedia.py	2010-05-04 14:43:03 UTC (rev 8143)
 <at>  <at>  -2177,7 +2177,7  <at>  <at> 
 #  New add API query.

 #   api.php?action=query&prop=categories&titles=Albert%20Einstein
-# Plese solving bug 2995320 & 2995997. 
+# fixed bug 2995320 & 2995997. 
         apitest=False
 #
         if apitest == api:
shizhao | 4 May 17:04 2010
Picon

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

Revision: 8144
Author:   shizhao
Date:     2010-05-04 15:04:43 +0000 (Tue, 04 May 2010)

Log Message:
-----------
categories() old and via API is same list

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

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2010-05-04 14:43:03 UTC (rev 8143)
+++ trunk/pywikipedia/wikipedia.py	2010-05-04 15:04:43 UTC (rev 8144)
 <at>  <at>  -2206,7 +2206,8  <at>  <at> 
                 data=datas['query']['pages'].values()[0]
                 if "categories" in data:
                     for c in data['categories']:
-                        cats.append(c['title'])
+                        cpage=Page(self.site(), c['title'])
+                        cats.append(cpage)
 #            if len(data) == 2:
 #                data = data[0] + data[1]
 #            else:
 <at>  <at>  -2218,6 +2219,7  <at>  <at> 

                 else:
                     allDone = True
(Continue reading)

xqt | 4 May 18:07 2010
Picon

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

Revision: 8145
Author:   xqt
Date:     2010-05-04 16:07:48 +0000 (Tue, 04 May 2010)

Log Message:
-----------
categories() via api returns a list of category object instead of page objects (like the old method). This
method is still deactivated for now since api=False of cause it needs an additional api query instead of
collection these informations from page content.

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

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2010-05-04 15:04:43 UTC (rev 8144)
+++ trunk/pywikipedia/wikipedia.py	2010-05-04 16:07:48 UTC (rev 8145)
 <at>  <at>  -2165,7 +2165,7  <at>  <at> 

 

-    def categories(self, get_redirect=False,api=False):
+    def categories(self, get_redirect=False, api=False):
         """Return a list of categories that the article is in.

         This will retrieve the page text to do its work, so it can raise
 <at>  <at>  -2174,13 +2174,12  <at>  <at> 
         The return value is a list of Category objects, one for each of the
         category links in the page text.
(Continue reading)

xqt | 5 May 09:12 2010
Picon

SVN: [8146]

Revision: 8146
Author:   xqt
Date:     2010-05-05 07:12:45 +0000 (Wed, 05 May 2010)

Log Message:
-----------
translations fpr ckb-wiki (request #2996709)

Modified Paths:
--------------
    branches/rewrite/scripts/interwiki.py
    trunk/pywikipedia/interwiki.py

Modified: branches/rewrite/scripts/interwiki.py
===================================================================
--- branches/rewrite/scripts/interwiki.py	2010-05-04 16:07:48 UTC (rev 8145)
+++ branches/rewrite/scripts/interwiki.py	2010-05-05 07:12:45 UTC (rev 8146)
 <at>  <at>  -402,6 +402,7  <at>  <at> 
     'ca': (u'Robot ', u'afegeix', u'esborra', u'modifica'),
     'ce': (u'робот ', u'тIетоьхна', u'дIаяьккхина', u'хийцина'),
     'ceb': (u'robot ', u'Gidugang', u'Gitangtang', u'Gimodipikar'),
+    'ckb': (u'بۆت ', u'زیادکردن', u'لابردن', u'چاکسازی'),
     'crh': (u'robot ', u'ekley', u'çetleştire', u'deñiştire'),
     'cs': (u'robot ', u'přidal', u'odebral', u'změnil'),
     'cv': (u'робот ', u'хушрĕ', u'кăларса пăрахрĕ', u'улăштарчĕ'),

Modified: trunk/pywikipedia/interwiki.py
===================================================================
--- trunk/pywikipedia/interwiki.py	2010-05-04 16:07:48 UTC (rev 8145)
+++ trunk/pywikipedia/interwiki.py	2010-05-05 07:12:45 UTC (rev 8146)
(Continue reading)

xqt | 5 May 17:26 2010
Picon

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

Revision: 8147
Author:   xqt
Date:     2010-05-05 15:26:49 +0000 (Wed, 05 May 2010)

Log Message:
-----------
enable Page.categories() via api if there is no page content or force_api=True

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

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2010-05-05 07:12:45 UTC (rev 8146)
+++ trunk/pywikipedia/wikipedia.py	2010-05-05 15:26:49 UTC (rev 8147)
 <at>  <at>  -2165,7 +2165,7  <at>  <at> 

 

-    def categories(self, get_redirect=False, api=False):
+    def categories(self, get_redirect=False, force_api=False):
         """Return a list of categories that the article is in.

         This will retrieve the page text to do its work, so it can raise
 <at>  <at>  -2174,12 +2174,10  <at>  <at> 
         The return value is a list of Category objects, one for each of the
         category links in the page text.
         """
-        # New add API query.
(Continue reading)

xqt | 6 May 07:46 2010
Picon

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

Revision: 8148
Author:   xqt
Date:     2010-05-06 05:46:59 +0000 (Thu, 06 May 2010)

Log Message:
-----------
distinguish parameter from module name, bugfix for r7988

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

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2010-05-05 15:26:49 UTC (rev 8147)
+++ trunk/pywikipedia/wikipedia.py	2010-05-06 05:46:59 UTC (rev 8148)
 <at>  <at>  -5683,8 +5683,7  <at>  <at> 

             self._getUserDataOld(text, sysop = sysop, force = force)

-    
-    def search(self, query, number = 10, namespaces = None):
+    def search(self, key, number = 10, namespaces = None):
         """
         Yield search results for query.
         Use API when enabled use_api and version >= 1.11,
 <at>  <at>  -5695,7 +5694,7  <at>  <at> 
             params = {
                 'action': 'query',
                 'list': 'search',
(Continue reading)

xqt | 6 May 09:21 2010
Picon

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

Revision: 8149
Author:   xqt
Date:     2010-05-06 07:21:16 +0000 (Thu, 06 May 2010)

Log Message:
-----------
site.search(): yield only the given number of pages
page.categories(): enable api depending of a parameter which is True per default. Documtentation added:
pls be aware the api call returns also cats included by templates

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

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2010-05-06 05:46:59 UTC (rev 8148)
+++ trunk/pywikipedia/wikipedia.py	2010-05-06 07:21:16 UTC (rev 8149)
 <at>  <at>  -2165,19 +2165,14  <at>  <at> 

 

-    def categories(self, get_redirect=False, force_api=False):
-        """Return a list of categories that the article is in.
-
-        This will retrieve the page text to do its work, so it can raise
-        the same exceptions that are raised by the get() method.
-
-        The return value is a list of Category objects, one for each of the
-        category links in the page text.
(Continue reading)

russblau | 6 May 21:55 2010
Picon

SVN: [8150] branches/rewrite/pywikibot/data/api.py

Revision: 8150
Author:   russblau
Date:     2010-05-06 19:55:40 +0000 (Thu, 06 May 2010)

Log Message:
-----------
Supply missing attribute for APIError.

Modified Paths:
--------------
    branches/rewrite/pywikibot/data/api.py

Modified: branches/rewrite/pywikibot/data/api.py
===================================================================
--- branches/rewrite/pywikibot/data/api.py	2010-05-06 07:21:16 UTC (rev 8149)
+++ branches/rewrite/pywikibot/data/api.py	2010-05-06 19:55:40 UTC (rev 8150)
 <at>  <at>  -40,6 +40,7  <at>  <at> 
         self.code = code
         self.info = info
         self.other = kwargs
+        self.unicode = unicode(self.__str__())
     def __repr__(self):
         return 'APIError("%(code)s", "%(info)s", %(other)s)' % self.__dict__
     def __str__(self):

Gmane