-
Notifications
You must be signed in to change notification settings - Fork 0
Home
StravaExporter is a command line program to export Strava activities to your local computer in Garmin TCX file format. These can be downloaded from Garmin Connect or from Strava (though Strava exposes interactive export as GPX or original format, typically FIT format if it came from a Garmin device.) This program allows automating the process so you do not have to do it manually every time. The first time you run the program, it will open a browser for you to log in to Strava and authorize the app to access your data.
StravaExporter help [verb]
Display the list of available verbs (commands) if no verb is specified, else display help for the specified verb.
StravaExporter authorize [--port|-p n]
Authorization is done automatically the first time you run an export, and the authorization persists so only needs to be done once. But it can be redone with this command, for example to modify the permissions granted to the app, or if the default port of 8080 is in use. By default it uses port 8080 to receive the response from Strava, but this can be specified with the -p or --port option.
StravaExporter export [--days|-d n] [--output-path|-o path] [--save-config] [--fix-hrspikes max]
Export all activities in the last n days to the specified output-path. Days will default to 5 if not provided. If --save-config is specified, the specified days and path will be saved to the config file and used as the defaults on the next run. I had some issues occasionally where my heart rate monitor data would spike to completely unreasonable values. This frequently happens on cool, dry days where the HR strap may not have a good conductivity with skin. The --fix-hrspikes option will replace all heart rate data points above max with the average heart rate computed without these spurious values.
Typically you would want to set a default output directory with the --save-config option and then not need to specify it anymore. The app will skip downloading activities which already exist in the output directory.
User settings are persisted under C:\Users[username]\AppData\Local\StravaExporter
StravaExporter activity activity-ids [--output-path|-o path] [--save-config] [--fix-hrspikes max]
Download the specified activity or activities. The activity id can be seen on the Strava site. If you browse to a specific activity on Strava, the url looks like this: https://www.strava.com/activities/4066029826. Here the activity id is 4066029826. The remaining options are as described for the export verb.
StravaExporter is built in Visual Studio 2017 against .NET Framework 4.5. It has dependencies on the following Nugets from nuget.org:
CommandLineParser 2.5.0
Newtonsoft.Json 10.0.3
StrongNamer 0.0.8