Update settings to provide logfile path
This commit is contained in:
parent
1f4ec77467
commit
f7097af7b8
1 changed files with 6 additions and 1 deletions
|
@ -9,7 +9,9 @@ pomodoro = config['pomodoro']
|
||||||
|
|
||||||
if not os.path.isfile('settings.ini'):
|
if not os.path.isfile('settings.ini'):
|
||||||
# Set some essential initial values.
|
# 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()
|
write()
|
||||||
|
|
||||||
config.read('settings.ini')
|
config.read('settings.ini')
|
||||||
|
@ -22,6 +24,9 @@ def write():
|
||||||
def pomodoro_logfile():
|
def pomodoro_logfile():
|
||||||
return config['pomodoro']['logfile']
|
return config['pomodoro']['logfile']
|
||||||
|
|
||||||
|
def pomodoro_logpath():
|
||||||
|
return config['pomodoro']['logpath']
|
||||||
|
|
||||||
def pomodoro_latest_recorded(timestamp = None):
|
def pomodoro_latest_recorded(timestamp = None):
|
||||||
if timestamp:
|
if timestamp:
|
||||||
config.set('pomodoro', 'latest_recorded', str(timestamp))
|
config.set('pomodoro', 'latest_recorded', str(timestamp))
|
||||||
|
|
Loading…
Reference in a new issue