ViralBShah / JuliaOrgLogos

MIT License
9 stars 5 forks source link

[CI] Automatically build logo collections #5

Closed SaschaMann closed 3 years ago

SaschaMann commented 3 years ago

This adds an Actions workflow that creates a release for every push to main that changes the orgnames file. It'll attach a zipped and a tar'd copy of the logos/ folder to the release.

You can see it work on my fork of this repo:

It does not update the logos/ folder itself, though. If that's something you want, I can add it in a follow-up PR.

This doesn't quite solve the comment in the README but one could attach code that generates a pretty collection beneath it. I still think it's quite useful to download all logos at once without cloning the repo and rerunning the script.

ViralBShah commented 3 years ago

Thanks! I think it would be nice to update the logos folder itself. I think the file sizes are all going to be small enough that it'll be ok to do so.

ViralBShah commented 3 years ago

I believe @cormullion may have a script to generate the image of all the logos.

SaschaMann commented 3 years ago

I think it would be nice to update the logos folder itself. I think the file sizes are all going to be small enough that it'll be ok to do so.

I'll add that this weekend. It's a bit tricky to test scripts like this so I'd rather not do too many changes in one PR.


Since the PR itself doesn't change orgnames I triggered a build manually via the workflow dispatch. Thanks for the invite btw :)

cormullion commented 3 years ago

Yes, I have a Julia file that downloads the images named in orgnames and builds a composite image.

However, there's a small problem ... There are so far four icons ("FourierFlows", "GiovineItalia", "HolyLab", "Julia-Streamers") that are JPG rather than PNG. Cairo doesn't accept PNGs, so I'd either have to script some kind of conversion (probably via Images.jl) or leave them out, or perhaps persuade the owners to convert to PNGism... 😂

I'll add the script tomorrow and you can decide...

ViralBShah commented 3 years ago

I would have thought that if we asked Github for PNGs, it would retrieve PNGs or error out...

cormullion commented 3 years ago

Indeed but it appears not to be the case:

ulia> download("https://github.com/fourierflows.png", "/tmp/fourierflows.png")
"/tmp/fourierflows.png"

shell> file /tmp/fourierflows.png
/tmp/fourierflows.png: JPEG image data, baseline, precision 8, 213x213, components 3

(In this case we could ask @navidcy nicely to change to PNG, since they've contributed here already, but other repos might be less able to help...)

ViralBShah commented 3 years ago

I think the other repos will gladly accept a png if we send them one. :-)

ViralBShah commented 3 years ago

But it will be an ongoing battle. Best to be able to deal with both.

navidcy commented 3 years ago

I changed the logo to .png format. But @ViralBShah is right as Julia orgs become millions and millions you'll be continuously asking people to convert to png so it's best to be able to dean with both :)

cormullion commented 3 years ago

@navidcy Thanks for that! I ended up doing the conversion. One day GitHub might return a PNG version of a JPG icon when asked... :)