diff options
| author | hmjsp <hmjsp@liber8bits.com> | 2026-03-19 11:18:25 +0000 |
|---|---|---|
| committer | hmjsp <hmjsp@liber8bits.com> | 2026-03-19 11:18:25 +0000 |
| commit | 4b6845618b972153cef5b8c776dd7b018775e444 (patch) | |
| tree | 166576f397f8a363091f5f03869d9205721156a1 /main.py | |
| parent | af448c11a6ad47bc35f93bb6be82186f00699705 (diff) | |
| download | chronologgy-4b6845618b972153cef5b8c776dd7b018775e444.zip | |
use config/cache dirs rather than storing in same dir
- also display.py shows time in hours rather than minutes
Diffstat (limited to 'main.py')
| -rwxr-xr-x | main.py | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -8,6 +8,7 @@ from collections import OrderedDict import inputs import timers import formatting as f +import os print("welcome to lock-n-log, the best way to organise and analyse your focus time!") @@ -91,6 +92,15 @@ session["timer"] = timer session["ratio"] = ratio sesh_list.append(session) +config_dir = os.environ["HOME"] + "/.config/chronologgy" +try: + os.makedirs(config_dir) +except FileExistsError: + pass +except PermissionError: + print("permission denied: unable to create " + config_dir) + +csv_path = config_dir + "/main.csv" + for session in sesh_list: -# print(session) - f.sesh_to_log(session, "main.csv") + f.sesh_to_log(session, csv_path) |
