Index: trunk/tools/editor_trends/analyses/plugins/list_makers.py |
— | — | @@ -12,32 +12,24 @@ |
13 | 13 | http://www.fsf.org/licenses/gpl.html |
14 | 14 | ''' |
15 | 15 | |
16 | | -""" |
17 | | -== List makers == |
18 | | -Any editor who makes more than 10 mainspace edits a month to articles with titles that begin with "List of..." |
19 | | -""" |
20 | | - |
21 | | -import re # regular expression parsing |
22 | | - |
23 | | - |
24 | 16 | __author__ = '''\n'''.join(['Diederik van Liere (dvanliere@gmail.com)', ]) |
25 | 17 | __email__ = 'dvanliere at gmail dot com' |
26 | 18 | __date__ = '2011-01-25' |
27 | 19 | __version__ = '0.1' |
28 | 20 | |
29 | | - |
30 | | - |
31 | | -def burnout(var, editor, **kwargs): |
32 | | - |
| 21 | +def list_makers(var, editor, **kwargs): |
| 22 | + """ |
| 23 | + == List makers == |
| 24 | + Any editor who makes more than 10 mainspace edits a month to articles with titles that begin with "List of..." |
| 25 | + """ |
33 | 26 | articles_by_year = editor['articles_by_year'] |
34 | | - |
35 | 27 | count = 0 |
36 | 28 | |
37 | 29 | for year in xrange(new_wikipedian.year, var.max_year): |
38 | 30 | for month in xrange(1, 13): |
39 | 31 | for article in articles_by_year[year][month]: |
40 | 32 | """ locate article titles containing "List of" """ |
41 | | - if re.search('List of', article): |
| 33 | + if article.find('List of') > -1: |
42 | 34 | count = count + 1 |
43 | 35 | |
44 | 36 | |