Skip to content

Instantly share code, notes, and snippets.

@ianhomer
Last active March 20, 2018 21:37
Show Gist options
  • Save ianhomer/981c8ae0ef3ab4f8eec43bb6f42b664c to your computer and use it in GitHub Desktop.
Save ianhomer/981c8ae0ef3ab4f8eec43bb6f42b664c to your computer and use it in GitHub Desktop.
convert-fitbit-weight-json-to-csv
# Download fitbit weight as JSON and put in weight.json
# Download it by accessing page in the web https://www.fitbit.com/weight?end-date=2018-03-20&period=all&start-date=2018-02-20
# and then find the content in the web traffic. Note that the API restricts to 30 days.
cat fitbit-weight.json | python -m json.tool | grep 'dateTime\|weight' | awk 'ORS=/,$/?" ":"\n"' | awk '{print $1 $4}' > weight.csv
# Then you can import this into where ever you want ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment