Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.79 KB

README.md

File metadata and controls

54 lines (37 loc) · 1.79 KB

Globo

Dodge, Duck, Dip, Dive, Dodge

Automated workout routines delivered straight to your inbox (tutorial video here).

Add exercises, routines and workouts to fit your desired workout program. The workout_program scheduler will determine if a given workout should be delivered to your inbox on a given day.

Setup

This uses pipenv to manage the virtual env and all dependencies. If you don't have pipenv install it here then:

git clone https://github.com/automagictv/globo.git
cd globo
pipenv install --ignore-pipfile

To run:

pipenv run python globo/runner.py \
  --username [email protected] \
  --app_password 'yourapppassword' \
  --recipients [email protected],[email protected],[email protected]

If you want to set this up on a cron, you can do something like:

# Run at 12:05 AM every day
5 0 * * * pipenv run python /path/to/globo/runner.py --username [email protected] --app_password 'yourapppassword' --recipients [email protected],[email protected],[email protected] >> /path/to/cronlog.txt 2>&1

You may have to add /usr/local/bin to your path for the above to work.

Gmail App Password

To obtain a Gmail App Password, follow this guide.

Architecture

exercise.py

Defines the Exercise object.

routine.py

Defines the ExerciseRoutine objects (made up of Exercise objects).

workout.py

Defines the Workout object (made up of ExerciseRoutine objects).

workout_program.py

Defines a schdule (via DAY:Workout dicts) for a full workout program.

runner.py

Determines if the active workout program has a workout on the current day and, if so, sends the workout to the recipient list (from --username email).