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 --- formatting.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'formatting.py') diff --git a/formatting.py b/formatting.py index 9c8bffa..04f213d 100644 --- a/formatting.py +++ b/formatting.py @@ -38,7 +38,8 @@ def per_tag_per_day(file): date = rows[i]['date'] tag = rows[i]['tag'] if i > 0 and date == rows[i-1]['date']: - day_times[cur][tag] = day_times[cur].get(tag, 0) + int(rows[i]['elapsed']) + if rows[i]['type'] == 'focus': + day_times[cur][tag] = day_times[cur].get(tag, 0) + int(rows[i]['elapsed']) else: cur += 1 day_times.append({"date": date, tag: int(rows[i]['elapsed'])}) -- cgit v1.2.3