Skip to content

Instantly share code, notes, and snippets.

View VeryCrazyDog's full-sized avatar

VCD VeryCrazyDog

View GitHub Profile
@VeryCrazyDog
VeryCrazyDog / sports-tracker-download.js
Last active May 7, 2023 07:59 — forked from bilan/sports-tracker-download.js
Download all workouts from sports-tracker
// VCD: Change folder and file name, add metadata file, script shall be executed in Google Chrome.
// 'Show more' button shall be pressed until all workout are shown on page. You might have
// to manually filter out some control characters in the generated script. Works on 2020-11-21.
//
// Bilan: My fork fixed some api changes, added images downloading and informative gpx file names. Works on 2020/11/02.
//
// You can then upload it to Strava using this oneliner:
// find * -name '*.gpx' -print0 | while read -d $'\0' i; do ID=`echo $i | sed 's/.*id--//' | sed 's/--activity.*//'`; ACTIVITY=`echo $i | sed 's/.*--activity--//' | sed 's/--title.*//'`; NAME=`echo $i | sed 's/--file.gpx//' | sed 's/.*--title--//'`" ($ID/$ACTIVITY)"; echo "\n$NAME\n"; curl -X POST https://www.strava.com/api/v3/uploads -H "Authorization: Bearer ___TOKEN___" -F file=@"$i" -F data_type="gpx" -F description="SportsTracker import" -F name="$NAME" -F external_id="$i"; sleep 10;done
//
// Original description: