master
Strava Dedup
I upload activities to Strava using Garmin and Hevy. Hevy contains all the details of the sets I did and Garmin activity contains parameters like HR. This creates two activities in Strava for every activity I do.
This tool goes through your activity history and adds the description of Hevy activities into Garmin activities. The images from Hevy activities WILL NOT be re-uploaded to the Garmin activities
I say "Garmin activities" but it's bascially any activity that has a >30 minute overlap with the Hevy activity.
Strava API does not allow deletion of an activity from their API so you can erase the leftover Hevy activities by doing
for x in $(cat hevy_to_delete); do
echo $x;
curl "https://www.strava.com/athlete/training_activities/$x" \
--compressed -X DELETE -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0' \
-H 'Accept: text/javascript, application/javascript, application/ecmascript, application/x-ecmascript' \
-H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br, zstd' \
-H 'Referer: https://www.strava.com/athlete/training' \
-H 'X-CSRF-Token: ...' \
-H 'X-Requested-With: XMLHttpRequest' -H 'Origin: https://www.strava.com' -H 'DNT: 1' -H 'Sec-GPC: 1' \
-H 'Connection: keep-alive' -H 'Cookie: ...' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Site: same-origin' -H 'Priority: u=0' -H 'Pragma: no-cache'
-H 'Cache-Control: no-cache' -H 'TE: trailers';
done;
Description
Languages
Rust
100%