16 lines
728 B
Markdown
16 lines
728 B
Markdown
# Exercise import
|
|||
|
|
|
||
|
|
Builds the bundled Exercise Library in `assets/exercises/` from
|
||
|
|
[free-exercise-db](https://github.com/yuhonas/free-exercise-db) (Unlicense).
|
||
|
|
|
||
|
|
```sh
|
||
|
|
git clone --depth 1 https://github.com/yuhonas/free-exercise-db.git <somewhere outside the repo>
|
||
|
|
python -m venv .venv
|
||
|
|
.venv/Scripts/python -m pip install -r requirements.txt
|
||
|
|
.venv/Scripts/python convert.py <somewhere outside the repo>/free-exercise-db
|
||
|
|
.venv/Scripts/python -m pytest
|
||
|
|
```
|
||
|
|
|
||
|
|
The script slims `dist/exercises.json`, assigns each Exercise its Mode (`stretching` category →
|
||
|
|
Stretching, everything else → Workout) and converts every image to a WebP of at most 480 px,
|
||
|
|
flattened to `images/<id>_<n>.webp`. Rerunning it replaces the previous output.
|