SingleFile CLI 2.26.0
New features
-
New option
--remove-link-query-strings: remove the query strings of the links (aandareaelements with a relative or http(s) URL), e.g. tracking parameters, session ids and signed URLs. The fragment is kept, and the other links (e.g.mailto:) and the form actions are left alone.single-file https://www.example.com/article page.html --remove-link-query-strings -
New function
%switch<value|case1|result1|case2|result2|...|default>in--filename-template: it comparesvaluewith each case and returns the matching result, ordefaultwhen no case matches (gildas-lormeau/SingleFile#2052 by @TheGhost78).single-file https://www.bbc.com/news --filename-template "%switch<{url-hostname-domain}|bbc|BBC|imdb|IMDb|%capitalize<{url-hostname-domain}>>.html"
CLI fixes and improvements
- Updated single-file-core to 1.12.0:
- pages using many web fonts are processed faster when the alternative fonts are removed, the parsed
srclists and the font details are cached (gildas-lormeau/single-file-core#12 by @pirate) - with
--load-deferred-content-keep-zoom-level, the sizes and positions reported to the page are scaled like the page, so pages that lay out their content from them are saved whole (gildas-lormeau/SingleFile#1919 by @noto10)
- pages using many web fonts are processed faster when the alternative fonts are removed, the parsed
Co-authored by Claude (Claude Code)