-
Notifications
You must be signed in to change notification settings - Fork 0
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
Added support for customizing ZIM logo #37
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #37 +/- ##
==========================================
+ Coverage 91.85% 92.28% +0.43%
==========================================
Files 4 4
Lines 356 376 +20
Branches 45 48 +3
==========================================
+ Hits 327 347 +20
Misses 25 25
Partials 4 4 ☔ View full report in Codecov by Sentry. |
4505ba2
to
2a84b94
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, few comments
aeff865
to
8db9ae1
Compare
8db9ae1
to
3d37df4
Compare
3d37df4
to
7b219f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #32
This change adds a new flag
--logo-format
that can be used to set a logo for the ZIM from a URL or local file. It supports formatting directives. This means we can fetch files fromfreeCodeCamp/devdocs
which does have 32x32 images (labeled as[email protected]
in the repo). I didn't make this the default because they look fine but not great, but the property might still be useful with an S3 bucket or mounted volume.devdocs2zim --output /tmp/devdocs \ --slug=http,lua~5.4,vue~3 \ --logo-format="https://raw.githubusercontent.com/freeCodeCamp/devdocs/refs/heads/main/public/icons/docs/{slug_without_version}/[email protected]"
I made the method that fetches and resizes the image static so I think it could be lifted up into
devdocs2zim
.