Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[suggestion] Download images script #8

Open
viciousnemesis opened this issue Oct 29, 2023 · 1 comment
Open

[suggestion] Download images script #8

viciousnemesis opened this issue Oct 29, 2023 · 1 comment

Comments

@viciousnemesis
Copy link

Because the images are tucked away, it would be nice to have a script to download them all. It would be even nicer if you could automatically create a gif from the images as well ;)

With the help of ChatGPT, I had this made. GitHub won't allow me to upload .sh files, so it's a .txt. It had to do some renaming due to directory creation/matching issues with the following exercises:

  • 3/4 Sit-Up
  • 90 90 Hamstring
  • Adductor Groin
  • Bradford Rocket Presses
  • Gorilla Chin Crunch
  • Knee Hip Raise on parallel bars
  • Rocky Pullups pulldowns
  • Trail Running walking

image_download.txt

@yuhonas
Copy link
Owner

yuhonas commented Nov 22, 2023

Love the idea!, from taking a look at the script I believe the issue you've got is your using the name field in the JSON vs the id field which normalises the name into an underscored version eg. Gorilla Chin/Crunch vs Gorilla_Chin_Crunch

I didn't run the script however I did validate at least the JSON and directory matching is correct eg.

cd exercises
cd "$(jq --raw-output < Gorilla_Chin_Crunch.json '.id')"

I think this could be a potentially simple task in the Makefile just a simple glob/enumeration with the image magick convert command you've got but always open to other implementations :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants