Skip to content

Instantly share code, notes, and snippets.

@phuysmans
Created July 22, 2019 08:44
Show Gist options
  • Save phuysmans/82b2700eef279db2dd201001912f08c2 to your computer and use it in GitHub Desktop.
Save phuysmans/82b2700eef279db2dd201001912f08c2 to your computer and use it in GitHub Desktop.
detect time errors in tcx files - strava bad time data
# install xml2json
npm install xml2json
# convert tcx to json
node_modules/xml2json/bin/xml2json < Downloads/3868462012.tcx > Downloads/3868462012.json
# find all trackpoints where date not starts with the activity date
jq '.TrainingCenterDatabase.Activities.Activity.Lap.Track.Trackpoint[] | select(.Time | startswith("2019-07-21") | not )' Downloads/3868462012.json
# edit and upload
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment