Skip to content

A script that allows you to export your workouts and do various things with them.

License

Notifications You must be signed in to change notification settings

Korrd/strava-exporter

Repository files navigation

logo Strava Exporter

lint status License version

This tool will export all workouts from strava onto a folder, then extract each workout's track and save each to gpx files. Useful for sharing tracks and doing backups.

Motivation

Strava will only provide batch downloads of ALL of an user account's contents at once, which is inconvenient since we may only wish to download workouts and its tracks.

Hence, I decided to write this tool so I could sync those workouts to other apps and do some backups as well.

Features

  • Oauth flow support: Implements strava's oauth, saving the pain of having to do all sort of things to get a proper token.
  • Multiple platforms supported: Meant to be run on either 🍎 MacOS, 🐧 Linux.
  • Ratelimiting support: This tool respects strava's rate-limits
    • 15m ratelimiter: It'll pause and then resume as the ratelimiter resets.
    • Daily ratelimiter: The tool will move on to the next step and extract tracks from all already downloaded workouts. You may run it again the next day to finish downloading your data.
  • Resume capability: You can stop it (^C), then resume from where it left at any time.
  • Idempotence: It'll skip workouts already downloaded, and ensure your already-downloaded workouts always reflect what's on your strava account. Hence, any changes to already-downloaded workouts on strava will be synced to your local.
  • Custom tracks output folder: Useful if you wish to store tracks somewhere else, like Google Drive, Dropbox, a network or external drive, etc. This can also be used so those are picked up for importing by other apps, like 🌎 Fog of World's track sync.

Prerequisites

If needed, install all required packages described on the requirements.txt file as follows:

make setup

Usage

  • Get the Client ID & Secret values from strava's at its API config page. If no API app is set, you can create a new one following these instructions

  • Run the tool

    make run
  • Provide Client ID and Secret and any other parameters when asked, then wait for it.

    • Retrieved workouts will be saved to whichever path you provide during setup. If not provided, it'll save them to the workouts folder, in json format & with all its metadata intact.
    • All extracted tracks will be saved to either the tracks or custom-set folder in gpx format. These come from each workout polyline.

Collaborating

Pull requests are welcome. For more info, see the Contributing file.

About

A script that allows you to export your workouts and do various things with them.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published