diff options
Diffstat (limited to 'munin.py')
-rw-r--r-- | munin.py | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -1,5 +1,5 @@ import sys -from fit import Fit +from app import fit def select_entries(module_list): @@ -7,12 +7,15 @@ def select_entries(module_list): if __name__ == "__main__": - fit = Fit('static/fit.git') - entries = map(lambda x: select_entries(fit.get_module(x)), fit.get_modules()) + 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 Fit' + print 'graph_title Klausuren' print 'graph_vlabel Amount' - print 'exams.label Klausuren' + for label in fit.keys(): + print '%s.label %s' % (label, label.capitalize()) else: - print 'exams.value',sum(map(lambda x: len(x), entries)) + for label, value in entries.items(): + print '%s.value %s' %(label, sum(map(lambda x: len(x), value))) |