Nicolas Dumazet avatar Nicolas Dumazet committed e2cbeba

details on output format

Comments (0)

Files changed (1)

 #        except (IOError, EOFError):
 #            oldArticles = {}
 
+
+        # Filling up a dictionary where keys are meant for template
+        # https://secure.wikimedia.org/wikipedia/fr/wiki/Utilisateur:NicDumZ/Eval_Detail
+        # Keys from 0 to 48, plus 'projet', plus 'total'
         # XXX it would be nicer to use an appropriate Evaluation class instead
         #   of a dict: it would allow cleaner semantics
         results[project] = {}
 
-        results[project]['project'] = project
+        results[project]['projet'] = project
 
         total = 0
         # first walk an importance axis
                 artByCat[imp].add(p)
                 articles[p.title()][0] = imp
             lenCat = len(artByCat[imp])
+            # last line of the table: [43; 48], sums by importance
             results[project][43 + i] = u'[[:%s|{{formatnum:%s}}]]' % (catname, lenCat)
             total += lenCat
 
                     articles[p.title()][1] = av
                 except KeyError:
                     pass
+            # last column of the table: 6,12,18,24,30,36,42 sums by quality
             results[project][6*(i + 1)] = u'[[:%s|{{formatnum:%s}}]]' % (catname, len(artByCat[av]))
 
 
                 else:
                     results[project][i] = ''
                 i += 1
+            # skip the sum
             i += 1
 
 ### This is unfinished/untested feature "history" of evaluations
         t = pywikibot.Page(pywikibot.Link(u'Projet:%s/Évaluation/Total évalué' % project))
         putNb(t, totalEval)
 
+        # bottom right value
         results[project][48] = '{{formatnum:%s}}' % totalEval
 
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.