🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

peloton-to-tcx

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

peloton-to-tcx

Convert Peloton data to TCX files

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

peloton-to-tcx

End of Life: Peloton added direct Strava support which makes this module unnecessary. This will probably stop working next time Peloton's API changes

What is it

Get's Peloton workout data and creates a TCX file that can be uploaded to Strava or elsewhere.

This package can be required in another node module or used from CLI.

Supported Fields

Cadence, Speed, Heart Rate, and Power are all supported. Power is an extension that is used by Strava, so it may not appear if you import the TCX to somewhere else.

Storing Login Info, Optional

To avoid having to enter a login and password every time, you can create environment variables for PELOTON_LOGIN and PELOTON_PASSWORD. Or, you can store these in a file named .env next to the package.json file. The contents will look something like:

PELOTON_LOGIN=myusername
PELOTON_PASSWORD=mypassword

CLI

If you install globally then p2t -h should be available and print use instructions. Or if installed locally, depending on your OS, run node bin/p2t or just bin/p2t.

Use in Node

var p2t = require('peloton-to-tcx');
p2t(options, callback);

The callback result when successful will be an array of TCX files.

options

limit Number of recent workouts to convert

resultsDirectory Directory where TCX files should be saved, default is "./results"

pLogin Peloton username or email

pPassword Peloton password

Tests

npm test requires environment variables be set for PELOTON_LOGIN and PELOTON_PASSWORD.

License

MIT

FAQs

Package last updated on 11 Mar 2016

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