Giter Site home page Giter Site logo

lucs1590 / strava-to-trainingpeaks Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 330 KB

This is a simple script that will download your activities from Strava and upload them to TrainingPeaks in assisted mode.

License: MIT License

Python 100.00%
bike biking conversion converter runner running sports sports-data strava swim

strava-to-trainingpeaks's Introduction

Strava to TrainingPeaks

strava-to-tp-logo

Tweet codecov Python Coverage CodeFactor

This script simplifies the process of downloading activities from Strava and uploading them to TrainingPeaks in assisted mode.

How it works

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.

Features

  • 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

Workflow

  1. Choose the sport you want to export;
  2. Do you want to download the .tcx file or select from the local directory?
    1. User chooses the ID of the activity on Strava;
    2. The download is performed by accessing the activity route with /export_original or /export_tcx endpoints;
  3. Indicate the path of the local directory file;
  4. If it is swimming or something else, the .tcx file is formatted; if it is running or biking, the .tcx file is validated;
  5. Indent the .tcx file.

Installation

Prerequisites

  1. Python 3.6 or higher installed;
  2. Pip installed;
  3. Logged into your Strava account in your preferred browser.

Steps

  1. Clone the repository;
git clone https://github.com/Lucs1590/strava-to-trainingpeaks
  1. Navigate to the project directory:
cd strava-to-trainingpeaks
  1. Install the dependencies;
pip install -r requirements.txt
  1. Run the script;
python src/main.py

Usage

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.

Example Usage

asciicast

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

  1. Fork the repository.
  2. Create a new branch for your feature (git checkout -b my-feature).
  3. Commit your changes (git commit -m 'feat: My new feature').
  4. Push to the branch (git push origin my-feature).
  5. Create a new Pull Request.

strava-to-trainingpeaks's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.