summaryrefslogtreecommitdiffstats
path: root/munin.py
blob: 01c3f0257ef03aa3902b1b9b135c71ca26aa44f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import sys
from fit import Fit


def select_entries(module_list):
  return map(lambda x: x[1], module_list)


if __name__ == "__main__":
  fit = Fit('static/fit.git')
  entries = map(lambda x: select_entries(fit.get_module(x)), fit.get_modules())

  if len(sys.argv) > 1 and sys.argv[1] == 'config':
    print 'graph_title Fit'
    print 'graph_vlabel Amount'
    print 'exams.label Klausuren'
  else:
    print 'exams.value',sum(map(lambda x: len(x), entries))