This code allows you to copy trainer road workout into your training peaks account.
- login to your Trainer Road account,
- open the workout. example: https://www.trainerroad.com/cycling/workouts/20725-bald-knob
- Open https://raw.githubusercontent.com/pchalacis/trainerroad-to-trainingpeaks/master/minimised/trainerroad.js file and copy it's content.
- On your Trainer Road window, open javascript console (for eaxample, for Chrome view -> developer -> javascript console).
- In the console, paste content of the file from step 3. 5a. enter your workout library ID from Training Peaks
- Login to your Training Peaks account
- Open javascript console and paste what you have in the clipboard
- Refresh TrainingPeaks page. your workout will be in the library. 9a. you don't have to refresh the page every time - you can add multiple workouts without refreshing.
- login to training peaks
- open javascript console
- switch to "network" tab"
- open your workout library
- add any workout to the library you want to use for the imports
- in the network tab of the javascript console new row will appear (it will be named "items") and the url will look like https://tpapi.trainingpeaks.com/exerciselibrary/v1/libraries/XXXXX/items. The XXXXX is your library ID
- You need premium Training Peaks account, or at least the initial 7 days trial to be able to put workouts in the future
- Script creates workout with the power profile, but ignores slopes
- Script ignores any notes
- If you don't trust javascript code, don't use it. There is no phishing and the source is available in /source.
- I take no responsibility for hte script. use at will.
- No, I will not post Trainer Road plans here, this script is to make your life easier if you use both, not to get yourself a free training plan.
- If you want to make your life easier - create a bookmarklet with the code from step 3
- if you always import workouts to the same library, add
var libId=XXXX;
at the begining of the bookmarkled, right afterjavascript:(function(){
. (XXXX is your library ID)
- Sorry, works for me, use at will. Found a bug? Create a pull request. Feature request? Make it yourself, I'm busy training ;)
- Code was tested on 2 TP accounts, under Chrome.