Skip to content

Instantly share code, notes, and snippets.

@zealot128
Created June 2, 2018 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zealot128/1069666e9e8ee64e2b1bdafe77d99208 to your computer and use it in GitHub Desktop.
Save zealot128/1069666e9e8ee64e2b1bdafe77d99208 to your computer and use it in GitHub Desktop.
Strava personal heatmap
cd "$1"
outdir='GPX_OUT'
mkdir -p $outdir
cp activities/*.gpx $outdir
cd activities
for i in `ls *.fit.gz`
do
echo "converting ${i} to gpx"
dest="../$outdir/$i"
gunzip < "$i" | gpsbabel -i garmin_fit -f - -o gpx -F "${dest}.gpx"
done
for i in `ls *.tcx.gz`
do
echo "converting ${i} to gpx"
dest="../$outdir/$i"
gunzip < "$i" | sed 's/^ *<.xml/<?xml/' | gpsbabel -i gtrnctr -f - -x simplify,count=999 -o gpx -F "${dest}.gpx"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment