[Pywikipedia-l] SVN: [4838] trunk/pywikipedia/featuredcount.py
leogregianin at svn.wikimedia.org
leogregianin at svn.wikimedia.org
Wed Jan 9 17:36:47 UTC 2008
Revision: 4838
Author: leogregianin
Date: 2008-01-09 17:36:47 +0000 (Wed, 09 Jan 2008)
Log Message:
-----------
print featured articles in my language too
Modified Paths:
--------------
trunk/pywikipedia/featuredcount.py
Modified: trunk/pywikipedia/featuredcount.py
===================================================================
--- trunk/pywikipedia/featuredcount.py 2008-01-09 17:23:17 UTC (rev 4837)
+++ trunk/pywikipedia/featuredcount.py 2008-01-09 17:36:47 UTC (rev 4838)
@@ -28,9 +28,9 @@
elif p.namespace()==1:
arts.append(wikipedia.Page(p.site(), p.titleWithoutNamespace()))
wikipedia.output('\03{lightred}** wikipedia:%s has %i featured articles\03{default}' % (site.lang, len(arts)))
- return arts
-
+
if __name__=="__main__":
+ mysite=wikipedia.getSite()
fromlang=featured_name.keys()
fromlang.sort()
try:
@@ -38,5 +38,6 @@
fromsite=wikipedia.Site(ll)
if not fromsite==wikipedia.getSite():
arts=featuredArticles(fromsite)
+ arts_mysite=featuredArticles(mysite)
finally:
wikipedia.stopme()
More information about the Pywikipedia-l
mailing list