feat: add icon download processor#159
Open
Rabenherz112 wants to merge 6 commits into
Open
Conversation
1 task
Downloads icons from software `icon_url` entries and converts them to webp
3698a53 to
bf484b6
Compare
nodiscc
requested changes
Jun 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
download_icons.pyThis adds the discussed icon downloader from #157. It currently:
<source_directory>/software/*.yml, reads each entry'sicon_url, downloads it, and writes a square WebP to<output_directory>/<yaml-name>.webp{PNG, ICO, GIF, BMP}(which is what most icons actually are), and lossy WebP at quality 85 for opaque JPEG/WEBP (the lossy branch only exists because when I tested it, encoding a JPEG icon losslessly actually doubled the output size for some reason).icosources.webpalready exists by default (skip_when_icon_present: True)awesome_lintthat flags.webpfiles inicons/with no matching software YAML (dangling-icon detection)One deviation from what was originally discussed: instead of the warn-mostly behavior mentioned in the issue, this errors out on failures instead. That probably makes more sense for a pipeline and matches the existing behavior of the other processors much better anyway.
I also did some testing around size and format. I had AI generate a benchmark to check whether PNG or WebP made more sense in practice. The data comes from an import of dashboard-icons where I added the WebP URL to every project matched, so the benchmark ran across 467 icons. Unless otherwise noted, all values below are means.
Details
Run metadata
tests/awesome-selfhosted-dataAt-a-glance: mean bytes per icon (and sum across encoded entries)
Per-size detail
64x64
96x96
128x128
192x192
256x256
Source-size distribution (pre-processing)
Use this to pick a sensible
max_download_bytescap — the p99 row tells you the smallest cap that would accept ~99% of real icons.Source format breakdown
Rejection breakdown
To test it, you can use the current
awesome-selfhosted-repo, run my dashboard-icons import script to populateicon_urlfields, then run hecat against it.