diff --git a/README.md b/README.md index a7cc561..5514531 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ Pmodoro Prompt is extremely simplistic, and only has a description field and aut ``` mkdir -p ~/Projects/agaric/python -git clone git@gitlab.com:agaric/python/pomodoroprompt.git -cd pomodoroprompt -python -m pip install --user -r requirements.txt +git clone git@gitlab.com:agaric/python/parse-timelogs-for-upload.git +cd parse-timelogs-for-upload +python3 -m pip install --user -r requirements.txt ``` ## Usage diff --git a/settings.py b/settings.py index c51e3e9..b3fc6a3 100644 --- a/settings.py +++ b/settings.py @@ -10,16 +10,21 @@ pomodoro = config['pomodoro'] if not os.path.isfile('settings.ini'): # Set some essential initial values. pomodoro['logfile'] = '~/Projects/agaric/python/pomodoroprompt/logs/2021.csv' - with open('settings.ini', 'w') as configfile: - config.write(configfile) + write() config.read('settings.ini') + +def write(): + with open('settings.ini', 'w') as configfile: + config.write(configfile) + def pomodoro_logfile(): return config['pomodoro']['logfile'] -def pomodoro_latest_start(value = None): +def pomodoro_latest_recorded(value = None): if value: - pomodoro.set('latest_start', value) + pomodoro.set('latest_recorded', value) + write() else: - return pomodoro.get('latest_start', None) + return pomodoro.get('latest_recorded', None)