Zwift workout generator
Project description
Zwift workout generator
Have you ever been frustrated by any WYSIWYG workout editor, such as the Zwift Workout editor and the TrainingPeaks Workout Builder?
ZWOG makes it easier to generate structured workouts using a syntax similar to the one used on What's on Zwift?.
Installation
PyPI
Install the latest stable version from PyPI
$ pip install zwog
GitHub
Install the version from the main branch
$ pip install git+https://github.com/tare/zwog.git
Syntax
The basic building blocks are ramp intervals
10min from 30 to 60% FTP
and steady state intervals
2hrs 10min @ 60% FTP
Interval durations can be given in seconds (sec
,s
), minutes (min
,m
), and hours (hrs
,h
).
Moreover, it is possible to create repeated intervals
4x 5min @ 95% FTP, 5min @ 85% FTP
Finally, a complete workout can be defined as follows
10min from 40 to 85% FTP
3x 5min @ 95% FTP, 5min @ 86% FTP
5min @ 50% FTP
3x 5min @ 95% FTP, 5min @ 86% FTP
10min from 75 to 55% FTP
The parser is rather robust when it comes to newlines and other whitespaces.
Usage
You can use the command line application
$ zwog --help
usage: zwog [-h] -i INPUT_FILE [-o OUTPUT_FILE] [-a AUTHOR] [-n NAME]
[-c CATEGORY] [-s SUBCATEGORY] [-v]
Zwift workout generator
optional arguments:
-h, --help show this help message and exit
-i INPUT_FILE, --input_file INPUT_FILE
input filename
-o OUTPUT_FILE, --output_file OUTPUT_FILE
output filename
-a AUTHOR, --author AUTHOR
author name
-n NAME, --name NAME workout name
-c CATEGORY, --category CATEGORY
category
-s SUBCATEGORY, --subcategory SUBCATEGORY
subcategory
-v, --version show program's version number and exit
or call it from Python
import zwog
workout_text = "15min from 10 to 50% FTP 5min from 50 to 70% FTP 2x 0.5hrs @ 100% FTP, 0.5hrs @ 50% FTP, 10min from 80 to 90% FTP 2min @ 50% FTP\n2min @ 50% FTP\n 10min @ 50% FTP, 10min @ 60% FTP 10min from 50 to 10% FTP"
workout = zwog.ZWOG(workout_text)
workout.save_zwo('workout.xml')
print(workout)
print(f"{round(workout.tss)} TSS")
Limitations
- Only the ZWO file format is supported currently
- Workout files have to be uploaded manually to Zwift
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file zwog-1.0.0.tar.gz
.
File metadata
- Download URL: zwog-1.0.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.12.0 Darwin/23.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d9ebc204a3a12ef61b4217005be6c66507785935d6aeade79629f5050fd4c3c |
|
MD5 | 974ab2c7e6a748ca795547e73a6d5097 |
|
BLAKE2b-256 | 76967d4aef8d80384a9999013809356a80714ce3b0175196427f7e66c3bb91e2 |
File details
Details for the file zwog-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: zwog-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.12.0 Darwin/23.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e728d46ff141da5ece95747de26dd990e7ed8014020dc88b9b9202cf1b1a67c9 |
|
MD5 | 746c6fd2fa5eacb00f1a64f0e15018bc |
|
BLAKE2b-256 | 3110eb8c057bad4e5cba029ca18f64f0de459ee56435e8b94f6232eb395fdf23 |