From f7097af7b86464a85a8b636a8a11b14d7f077274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Melan=C3=A7on?= Date: Tue, 25 May 2021 15:58:28 -0400 Subject: [PATCH] Update settings to provide logfile path --- settings.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/settings.py b/settings.py index 8228ad7..9e6cd7e 100644 --- a/settings.py +++ b/settings.py @@ -9,7 +9,9 @@ pomodoro = config['pomodoro'] if not os.path.isfile('settings.ini'): # Set some essential initial values. - pomodoro['logfile'] = '~/Projects/agaric/python/pomodoroprompt/log/2021.csv' + # pomodoro['logfile'] = '~/Projects/agaric/python/pomodoroprompt/log/2021.csv' + # This path must be absolute, for some reason using ~ for home isn t wor:: + pomodoro['logpath'] = '/home/mlncn/Projects/agaric/python/pomodoroprompt/log/' write() config.read('settings.ini') @@ -22,6 +24,9 @@ def write(): def pomodoro_logfile(): return config['pomodoro']['logfile'] +def pomodoro_logpath(): + return config['pomodoro']['logpath'] + def pomodoro_latest_recorded(timestamp = None): if timestamp: config.set('pomodoro', 'latest_recorded', str(timestamp))