Parses JSON text export from the Moves App into chunks of exercise activity and then uploads it into mongolab as Nightscout exercise events.
- Go to: http://moves-export.herokuapp.com/
- Authenticate by putting PIN number into Moves app on phone
- Pick export from date, and hit Start Export! button
- Once json text is done loading, copy text from output box
- Go to http://jsonlint.com/, paste in code, and hit Validate jsonlint will help identify problems in the file (extra commas, incomplete bracets, etc.) Delete out these extra elements until you have valid json.
- Copy valid json text from jsonlint, paste into text file in python directory.
- Put that filename in as INPUT_FILE below.
- Check all USER INPUTS below, set to appropriate values for you
- Run this script to generate text file of walks, runs, and bikes exceeding the threshold seconds set in INPUTS, with activity start time in UTC time.
- Next run text_to_mongo.py to upload the text output file to mongolab.
- Use moves_json_to_text.py to generate text file of threshold-exceeding walks, runs, bikes
- Set INPUT_FILENAME below to the name of the text file generated
- Ensure .config file has example text replaced with your actual mongolab URL and DB name
- Run script. All lines from text file will be entered as separate exercise events into mongolab database.
- Run reports in Nightscout to see your exercise data on your day-to-day plots
- Keep fighting the good fight, and kicking diabetes' %$$!