Giter Club home page Giter Club logo

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

Contributors

dependabot[bot] avatar lucs1590 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

strava-to-trainingpeaks's Issues

Add LLM Analysis

Description

The idea is that after converting the file to be exported to training peaks, ask the athlete if he wants to have feedback from an LLM (GPT4 or SportBERT) regarding the training performed.
At first I would send the entire tcx file, but the number of tokens would be very high and the service would be very expensive. Therefore, the idea is to summarize by points (as in the medium article) and send this in the prompt for LLM to analyze.
If the user chooses that he wants to have the LLM analysis, add the question "was there anything planned for this training?" so that this will also enrich the prompt.

TO-DO

  • Parse the tcx or gpx file;
  • Test both LLMs;
  • Write LinkedIn and Medium post.

Prompt

Based on the following data that is related to a {sport} training session, carry out an analysis highlighting positive points, where the athlete did well and where he did poorly and what he can do to improve in the next {sport}.

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Resources

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.