|
13 | 13 | \\
|
14 | 14 | '--`
|
15 | 15 | ```
|
16 |
| -Order food from Seamless based on your Fitbit activity for the day. |
| 16 | +Order one of your favorite meals from Seamless based on your Fitbit activity for the day. |
| 17 | +----------------------------------------------------------------------------------------- |
| 18 | + |
| 19 | +## Dependencies |
| 20 | +First, you'll need to set the following 6 Environmental Variables. The easy way is to just add these to ` |
| 21 | +~/.bash_profile` or `~/.zshrc`, depending on which shell you use. |
| 22 | + |
| 23 | +``` |
| 24 | +export SEAMLESS_EMAIL='name@email.com' |
| 25 | +export SEAMLESS_PASSWORD='mehungry' |
| 26 | +export FITBIT_CONSUMER_KEY='wwwwwwwwwwwwwwwwwwwwww' |
| 27 | +export FITBIT_CONSUMER_SECRET='xxxxxxxxxxxxxxxxxxxx' |
| 28 | +export FITBIT_USER_KEY='yyyyyyyyyyyyyyyyyy' |
| 29 | +export FITBIT_USER_SECRET='zzzzzzzzzzzzzzzzz' |
| 30 | +``` |
| 31 | + |
| 32 | +Then you'll need to install [`python-fitbit`](https://github.com/orcasgit/python-fitbit) like so: |
| 33 | + |
| 34 | +``` |
| 35 | +git clone https://github.com/orcasgit/python-fitbit.git |
| 36 | +cd python-fitbit |
| 37 | +sudo python setup.py install |
| 38 | +``` |
| 39 | + |
| 40 | +You'll also need to make sure you have `selenium` for python installed: |
| 41 | + |
| 42 | +``` |
| 43 | +sudo pip install selenium |
| 44 | +``` |
| 45 | +And have downloaded Firefox from [here]((http://www.mozilla.org/en-US/firefox/new/)) |
| 46 | + |
| 47 | +## Assumptions |
| 48 | +1. Your CC info is saved on Seamless |
| 49 | +2. You're at your home (default) address on Seamless. |
| 50 | + |
| 51 | +## Setup |
| 52 | +`fitbite` works by querying your fitbit activity for the today, comparing it to set of arbitrary tags and step levels in `fitbite.yaml` and then ordering one of your favorite meals from Seamless which have been named with the same tags. |
| 53 | + |
| 54 | +See an example list of my favorite meals: |
| 55 | + |
| 56 | + |
| 57 | +The names of each meal match the tagged calorie levels set in [`fitbite.yaml`](fitbite.yaml): |
| 58 | +``` |
| 59 | +levels: |
| 60 | + - LOW_CALORIES: 5000 |
| 61 | + - MEDIUM_CALORIES: 10000 |
| 62 | + - HIGH_CALORIES: 15000 |
| 63 | +``` |
| 64 | + |
| 65 | +## Runtime |
| 66 | +When your ready to run fitbite, just type `python fitbite.py`. That's it. |
| 67 | + |
| 68 | + |
0 commit comments