This script simplifies the process of downloading activities from Strava and uploading them to TrainingPeaks in assisted mode.
The idea for this script came from the need to synchronize my triathlon training data from my Samsung Watch to TrainingPeaks, a platform not directly compatible with my watch. The script streamlines this process by leveraging Strava as an intermediary.
- Downloads activities from Strava based on activity IDs.
- Assisted mode for choosing the sport and activity download/upload options.
- Formats TCX files for specific sports like swimming.
- Validates TCX files for running and biking activities.
Watch the video guide on exporting from Strava to TrainingPeaks manually
- Choose the sport you want to export;
- Do you want to download the
.tcx
file or select from the local directory;- User chooses the ID of the activity on Strava;
- The download is performed by accessing the activity route with
/export_original
or/export_tcx
endpoints;
- If it is swimming or something else, the
.tcx
file is formatted; if it is running or biking, the.tcx
file is validated; - Indent the
.tcx
file.
- Python 3.6 or higher installed;
- Pip installed;
- Logged into your Strava account in your preferred browser.
- Clone the repository;
git clone https://github.com/Lucs1590/strava-to-trainingpeaks
- Navigate to the project directory:
cd strava-to-trainingpeaks
- Install the dependencies;
pip install -r requirements.txt
- Run the script;
python src/main.py
Follow the on-screen instructions after running the script. You'll be prompted to choose the sport, select activity download options, and provide the file path if necessary.
This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository.
- Create a new branch for your feature (
git checkout -b my-feature
). - Commit your changes (
git commit -m 'feat: My new feature'
). - Push to the branch (
git push origin my-feature
). - Create a new Pull Request.