Update install instructions

This commit is contained in:
mlncn 2021-05-02 20:30:14 -04:00
parent eb9330b12f
commit 6b2caea884
2 changed files with 13 additions and 8 deletions

View file

@ -10,9 +10,9 @@ Pmodoro Prompt is extremely simplistic, and only has a description field and aut
``` ```
mkdir -p ~/Projects/agaric/python mkdir -p ~/Projects/agaric/python
git clone git@gitlab.com:agaric/python/pomodoroprompt.git git clone git@gitlab.com:agaric/python/parse-timelogs-for-upload.git
cd pomodoroprompt cd parse-timelogs-for-upload
python -m pip install --user -r requirements.txt python3 -m pip install --user -r requirements.txt
``` ```
## Usage ## Usage

View file

@ -10,16 +10,21 @@ 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/logs/2021.csv' pomodoro['logfile'] = '~/Projects/agaric/python/pomodoroprompt/logs/2021.csv'
with open('settings.ini', 'w') as configfile: write()
config.write(configfile)
config.read('settings.ini') config.read('settings.ini')
def write():
with open('settings.ini', 'w') as configfile:
config.write(configfile)
def pomodoro_logfile(): def pomodoro_logfile():
return config['pomodoro']['logfile'] return config['pomodoro']['logfile']
def pomodoro_latest_start(value = None): def pomodoro_latest_recorded(value = None):
if value: if value:
pomodoro.set('latest_start', value) pomodoro.set('latest_recorded', value)
write()
else: else:
return pomodoro.get('latest_start', None) return pomodoro.get('latest_recorded', None)