A tool for retrieving data about yourself from various sources and putting it into a MySQL database.
This tool is freely available under the MIT licence (see LICENCE) unless otherwise noted.
- Make sure that Java and Python 3 are installed
- Install the Python Google API Client with
pip3 install --upgrade google-api-python-clientand PyMySQL withpip3 install --upgrade PyMySQL - Create a wrapper directory (
mkdir personal-data) and enter it (cd personal-data) - Clone this Github repository with
git clone https://github.com/medude/personal-data.gitor download and extract the zip file into the wrapper directory - Go to this Google website
- Create a project and select continue
- Click the button to go to the credentials page
- Leave the first drop down menu at the default and select "Other UI" for the other one, also checking the "User data" radio button before clicking the button at the bottom.
- Choose a name. It doesn't matter very much.
- Choose your email and type a name in the product name box. It doesn't matter either.
- Choose download and put the resulting file in the wrapper directory that the project went into.
- Rename the file that you just downloaded to
client_secrets.json. - Create a file next to
client_secrets.jsoncalledlogin_data.json. Edit it, adding the following JSON:
{
"username": "<mysql_database_username>",
"password": "<mysql_database_password>"
}If you skipped the previous section, make sure to at least follow step 2 and steps 5 through 13, or else it will not work!
In src, run python3 fit_data.py to download your step counts from Google Fit. You can modify request.json in src to change the time period.