blob: 5fe1d1be0242eec1017693762cf1b26e57423046 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import sys
from app import fit
def select_entries(module_list):
return map(lambda x: x[1], module_list)
if __name__ == "__main__":
entries = {}
for name, instance in fit.items():
entries[name] = map(lambda x: select_entries(instance.get_module(x)), instance.get_modules())
if len(sys.argv) > 1 and sys.argv[1] == 'config':
print 'graph_title Klausuren'
print 'graph_vlabel Amount'
for label in fit.keys():
print '%s.label %s' % (label, label.capitalize())
else:
for label, value in entries.items():
print '%s.value %s' %(label, sum(map(lambda x: len(x), value)))
|