KendallDoesCoding / mogul-christmas

Ludwig Ahgren made a Christmas Album in 2020. I just thought of a project cause I was bored where you can play all the songs by a click of a button which you can already do from his timestamps but what makes it special is that it has lyrics of those songs too and a bunch of other features.
https://kendalldoescoding.tech/mogulchristmas
Creative Commons Zero v1.0 Universal
23 stars 62 forks source link

Gh-action to automatically convert images to .jpg and update extension in HTML #303

Closed KendallDoesCoding closed 2 years ago

KendallDoesCoding commented 2 years ago

As stated in #302 , I would prefer all photos to be in the .jpg format, but I can't help it when I download images from the internet/can't convert the images EVERY single time nor can anyone do it for that matter, so would prefer a gh-action who can automatically convert the images in to .jpg and where the HTML of the img src is stated, update the extension there, if possible.

@TechStudent10 @Panquesito7 - please lemme know if yall find a gh-action that can do this.

eduarecnam commented 2 years ago

Hi Kendall, I'll take care of this task if you don't mind. Thanks!

KendallDoesCoding commented 2 years ago

Hi Kendall, I'll take care of this task if you don't mind. Thanks!

Hi @eduarecnam , I'm not assinging anyone for this, as it's not a issue as of such, I only need help to find a gh-action, so if you find one please let me know.

On the other hand, if you can help make a gh-action to do so, then I'll assign you, but if your sharing a already existing gh-action, please do so here.

eduarecnam commented 2 years ago

Hi @KendallDoesCoding I found these two resources quite useful:

  1. https://github.com/marketplace/actions/find-and-replace
  2. https://github.com/marketplace/actions/imagemagick-action

I've been trying to make it work on my copy's repo, but I think I don't end up of understanding how exactly Github actions works. But trying this on my laptop to change the extension from png to jpg does work: mogrify -format jpg *.png

On the .png part of this command, you got to add the whole path towards the .png files. This is, if your files are at /home/user/images path, the command would be then: `mogrify -format jpg /home/user/images/.png`

So I'd say that this should work (see attached file) imagesConverter.yml.zip

I hope you find this helpful and if you manage to make it work, please let me know about it. Thanks!

KendallDoesCoding commented 2 years ago

Hi @KendallDoesCoding I found these two resources quite useful:

  1. https://github.com/marketplace/actions/find-and-replace
  2. https://github.com/marketplace/actions/imagemagick-action

I've been trying to make it work on my copy's repo, but I think I don't end up of understanding how exactly Github actions works. But trying this on my laptop to change the extension from png to jpg does work: mogrify -format jpg *.png

On the .png part of this command, you got to add the whole path towards the .png files. This is, if your files are at /home/user/images path, the command would be then: `mogrify -format jpg /home/user/images/.png`

So I'd say that this should work (see attached file) imagesConverter.yml.zip

I hope you find this helpful and if you manage to make it work, please let me know about it. Thanks!

Hi, this does help a lot.. Thanks.

Can you make a PR though?

eduarecnam commented 2 years ago

Done! :)

KendallDoesCoding commented 2 years ago

Done in #318, forgot to close this issue.