r89587 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89586‎ | r89587 | r89588 >
Date:19:00, 6 June 2011
Author:diederik
Status:deferred
Tags:
Comment:
Streamline meta title logic.
Modified paths:
  • /trunk/tools/editor_trends/etl/variables.py (modified) (history)

Diff [purge]

Index: trunk/tools/editor_trends/etl/variables.py
@@ -86,26 +86,29 @@
8787 elif ns == 4 or ns == 5:
8888 if title.find('Articles for deletion') > -1:
8989 title_meta['category'] = 'Deletion'
90 - elif title.find('Mediation Committee') > -1:
91 - title_meta['category'] = 'Mediation'
92 - elif title.find('Mediation Cabal') > -1:
93 - title_meta['category'] = 'Mediation'
9490 elif title.find('Arbitration') > -1:
9591 title_meta['category'] = 'Arbitration'
96 - elif title.find('Featured Articles') > -1:
97 - title_meta['category'] = 'Featured Article'
98 - elif title.find('Featured picture candidates') > -1:
99 - title_meta['category'] = 'Featured Pictures'
100 - elif title.find('Featured sound candidates') > -1:
101 - title_meta['category'] = 'Featured Sounds'
102 - elif title.find('Featured list candidates') > -1:
103 - title_meta['category'] = 'Featured Lists'
104 - elif title.find('Featured portal candidates') > -1:
105 - title_meta['category'] = 'Featured Portal'
106 - elif title.find('Featured topic candidates') > -1:
107 - title_meta['category'] = 'Featured Topic'
10892 elif title.find('Good Article') > -1:
10993 title_meta['category'] = 'Good Article'
 94+ elif title.find('Mediation') > -1:
 95+ if title.find('Mediation Committee') > -1:
 96+ title_meta['category'] = 'Mediation'
 97+ elif title.find('Mediation Cabal') > -1:
 98+ title_meta['category'] = 'Mediation'
 99+ elif title.find('Featured') > -1:
 100+ if title.find('Featured Articles') > -1:
 101+ title_meta['category'] = 'Featured Article'
 102+ elif title.find('Featured picture candidates') > -1:
 103+ title_meta['category'] = 'Featured Pictures'
 104+ elif title.find('Featured sound candidates') > -1:
 105+ title_meta['category'] = 'Featured Sounds'
 106+ elif title.find('Featured list candidates') > -1:
 107+ title_meta['category'] = 'Featured Lists'
 108+ elif title.find('Featured portal candidates') > -1:
 109+ title_meta['category'] = 'Featured Portal'
 110+ elif title.find('Featured topic candidates') > -1:
 111+ title_meta['category'] = 'Featured Topic'
 112+
110113 #print title_meta
111114 return title_meta
112115