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
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

View file

@ -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)