Save data from MyFitnessPal to a SQLite database.
Install this tool using pip
:
$ pip install myfitnesspal-to-sqlite
This tool relies on python-myfitnesspal
, which allows authentication via the system keyring.
Install python-myfitnesspal
using pip
:
$ pip install myfitnesspal
Store your MyFitnessPal password in the system keyring:
$ myfitnesspal store_password my_user
Note that all commands assume that your password is stored in the system keyring.
The diary
command retrieves food, exercise, goal and measurement entries for a given user and date.
$ myfitnesspal-to-sqlite diary myfitnesspal.db my_user 2021-07-14
To contribute to this tool, first checkout the code. Then create a new virtual environment:
cd myfitnesspal-to-sqlite
python -mvenv venv
source venv/bin/activate
Or if you are using pipenv
:
pipenv shell
Now install the dependencies and tests:
pip install -e '.[test]'
To run the tests:
pytest