From d1066e7a26d8da0d1ed2e15997a485879e46611d Mon Sep 17 00:00:00 2001 From: hmj6502 Date: Sun, 28 Dec 2025 15:38:17 +0000 Subject: stop/start & rest bank complete on stopwatch - cumulative time wasn't too bad to add actually - one id per session added - change formatting.py so that it only counts time that is of type 'focus' as time to put on chart - add pie chart and time in minutes rather than seconds to display.py --- display.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'display.py') diff --git a/display.py b/display.py index 1aa7b58..e160c6b 100755 --- a/display.py +++ b/display.py @@ -14,12 +14,14 @@ parser.add_argument("logfile", help="log file to display chart of", args = parser.parse_args() day_times = f.per_tag_per_day(args.logfile) -print(day_times) for day in day_times: chart = pygal.Bar() + pie = pygal.Pie() for key, value in day.items(): if key == "date": continue - chart.add(key, value) - chart.render_to_file(str(day["date"]+".svg")) + chart.add(key, round(value/60, 0)) + pie.add(key, round(value/60, 0)) + chart.render_to_file(str(day["date"]+"-bar.svg")) + pie.render_to_file(str(day["date"]+"-pie.svg")) -- cgit v1.2.3