-
Notifications
You must be signed in to change notification settings - Fork 0
How to add a new statistic
Alexandre Henrique Afonso Campos edited this page Mar 11, 2019
·
5 revisions
Every file that starts with stat-
in src/ generates a page with statistics.
- Create a python3 program and name the file stat-{foo}.py
- This file must produce a dictionary
out
containing at least a keys namedtitle
andtable
-
table
is a list of lists and must contain the statistics info. -
title
is self explanatory, but it's also going to be used to create a link on the main page (index). -
out
might also contain the keyslabels
(for the table),subtitle
,explanation
- call the function
build_results
from build_page.py. - Include
import sys
, get argv and pass tobuild_results
. - If you run
python3 stat-{foo}.py page=true
, a page will be created inside pages/. Else, statistics are going to be shown in terminal.