Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

trainerroad-to-zwiftout

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trainerroad-to-zwiftout

Converts TrainerRoad workout JSON into Zwiftout workout format.

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

TrainerRoad to Zwiftout

Converts TrainerRoad workout in JSON format to Zwiftout format.

Install

npm install trainerroad-to-zwiftout

Usage as a library

import trainerroadToZwiftout from "trainerroad-to-zwiftout";

const json = {
    Workout: {
        Details: {
            WorkoutName: "Bald Knob",
            WorkoutDescription:
                "<p>Bald Knob is 60 minutes of aerobic Endurance riding.</p>",
        },
        workoutData: [
            { seconds: 0, memberFtpPercent: 133.5, ftpPercent: 50.0 },
            { seconds: 1000, memberFtpPercent: 133.5, ftpPercent: 50.0 },
            { seconds: 2000, memberFtpPercent: 133.5, ftpPercent: 50.0 },
            { seconds: 3000, memberFtpPercent: 133.5, ftpPercent: 50.0 },
            { seconds: 4000, memberFtpPercent: 133.5, ftpPercent: 50.0 },
        ],
        intervalData: [
            {
                Start: 0,
                End: 3600,
                Name: "Workout",
                IsFake: false,
                TestInterval: false,
                StartTargetPowerPercent: 50.0,
            },
            {
                Start: 0,
                End: 150,
                Name: "Fake",
                IsFake: true,
                TestInterval: false,
                StartTargetPowerPercent: 50.0,
            },
        ],
    },
    Alternates: [],
};

console.log(trainerroadToZwiftout(json.Workout));

Outputs something like:

Name: Bald Knob
Author: TrainerRoad
Description: Bald Knob is 60 minutes of aerobic Endurance riding.

Rest: 02:30 50%
Interval: 02:30 55%
Interval: 02:30 60%
Interval: 02:30 65%

Usage as a command line tool

cat workout.json | trainerroad-to-zwiftout

FAQs

Package last updated on 27 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc