r85643 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85642‎ | r85643 | r85644 >
Date:21:40, 7 April 2011
Author:diederik
Status:deferred
Tags:
Comment:
Streamlined logic, should be faster.
Modified paths:
  • /trunk/tools/editor_trends/analyses/plugins/taxonomy_list_makers.py (modified) (history)

Diff [purge]

Index: trunk/tools/editor_trends/analyses/plugins/taxonomy_list_makers.py
@@ -31,6 +31,8 @@
3232 sys.exit(-1)
3333
3434 articles_edited = editor['articles_edited']
 35+ list_articles = db_articles.find('category', 'List')
 36+ print list_articles
3537 count = 0
3638 years = articles_edited.keys()
3739 for year in years:
@@ -38,9 +40,7 @@
3941 for month in months:
4042 articles = articles_edited[year].get(month, [])
4143 for article in articles:
42 - article = db_articles.find('id', article)
43 - print article
44 - if article['category'] == 'List':
 44+ if article in list_articles:
4545 count += 1
4646
4747 """ Add all editors with an edit count of more than 10 """