Skip to content

Instantly share code, notes, and snippets.

@trailjeep
Last active May 29, 2019 23:14
Show Gist options
  • Save trailjeep/5a2366a07e88c56d5196457a2a590f23 to your computer and use it in GitHub Desktop.
Save trailjeep/5a2366a07e88c56d5196457a2a590f23 to your computer and use it in GitHub Desktop.
Parse Android Blood Glucose Tracker App Data To CSV

Parse Android Blood Glucose Tracker App Data To CSV

Settings -> Manual backup & Restore -> BACKUP TO FILE -> Drive -> My Drive -> data.json

Blood Glucose Readings

$ jq -r '.entries[] | "\(.date),\(.concentration),\(.event),\(.notes)"' data.json | awk -F"," '{printf "%.0f", ($1/1000); print ","$2","$3","$4}' | awk -F"," '{("date -d @"$1" +%F\" \"%I\":%M%p\"")|getline $1; print $1","$2","$3","$4}' > data.csv
$ sed -i '1s;^;Date/Time,Value,Event,Notes\n;' data.csv

Blood Pressure

Weight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment