Skip to content

gfauredev/free-exercise-db

 
 

Repository files navigation

lang
en

License: Unlicense

Free Exercise DB 💪

My fork of the JSON (800+) Exercise Dataset by yuhonas that I use in my training app LogOut.

What do they look like?

All exercises are stored as seperate JSON documents and conform to the following JSON Schema. Here’s an example :

{
  "id": "alternate_incline_dumbbell_curl",
  "name": "Alternate Incline Dumbbell Curl",
  "force": "pull",
  "level": "beginner",
  "mechanic": "isolation",
  "equipment": "dumbbell",
  "primaryMuscles": [
    "biceps"
  ],
  "secondaryMuscles": [
    "forearms"
  ],
  "instructions": [
    "Sit down on an incline bench with a dumbbell in each hand being held at arms length. Tip: Keep the elbows close to the torso.This will be your starting position."
  ],
  "category": "strength",
  "images": [
    "alternate_incline_dumbbell_curl/0.jpg",
    "alternate_incline_dumbbell_curl/1.jpg"
  ]
}

See Alternate Incline Dumbbell Curl JSON file.

To further explore the data, you can use datasette.

How do I use them?

Main combined DB exercises.json, translated name and instructions DBs exercises.<language>.json and translated enums DB i18n.json are available through GitHub Releases.

For images, you can leverage GitHub's hostinge prefixing image path's contained in JSON with https://raw.githubusercontent.com/gfauredev/free-exercise-db/main/exercises/, eg. air_bike/0.jpg.

Build tasks

There are a number of helpful justfile tasks that you can use.

Linting & Check

To lint all the JSON files against the schema.json use

just lint

To check for non-unique IDs, use

just check

Combining into a single JSON file

If you make changes to any of the exercises or add new ones, recombine all single JSON files into a single JSON containing an array of objects, using the build just task

just build

Importing into PostgreSQL

To combine all JSON files into Newline Delimeted JSON suitable for import into PostgreSQL use the following just task

just build-ndjson

See also Importing JSON into PostgreSQL using COPY

TODO

  • Add image(s) to exercises missing them
    • australian_pull_up.json
    • pistol_squat.json
    • road_running.json
    • standing_calf_raise.json
  • Fix forces, e.g. bent_press and pallof_press variants pull instead of push
  • Fix missing equipment, e.g. close_grip_push_up_off_of_a_dumbbell, crunch_legs_on_exercise_ball

About

Open Public Domain Exercise Dataset in JSON format, over 800 exercises

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages

  • Python 82.2%
  • Nix 10.7%
  • Just 7.0%
  • Shell 0.1%