A hacky set of scripts to download all Strava activities as TCX files and then upload them to FinalSurge.
I needed a way to efficiently move all my previous running data into FinalSurge to support some ultrarunning coaching. Didn't want to do this labor intense process manually so I wrote a couple scripts. Hope you find them helpful.
- This is not production quality code, it worked when I needed it and I wanted to make it public in case others could make use of it.
- It uses a hack to fake the request that FinalSurge garmin upload web form was making. This is obviously brittle as any change to that forms inputs will break this script.
- If it does break you will need to use the chrome web inspector find the new form strucutre and update the finalsurge post request.
- Grab your strava cookies using method of your choice. (I used chrome web inspector after normal web login)
- set
STRAVA_COOKIE
env variable to the above value. - Grab your FinalSurge cookie using method of your choice. (Again I used chrome web inspector after normal web login)
- set
FINALSURGE_COOKIE
to the value obtained in step 3. - set
STRAVA_API_ACCESS_TOKEN
to your strava api access token. - set
STRAVA_ACTIVITY_PATH
to an existing directory where you want all your strava activites to download. - Run:
ruby download_strava_data.rb
- Run:
ruby upload_to_finalsurge.rb
- Use FinalSurge UI to add the newly uploaded files to your training log.