HTMLCLEAN(1)
π HTMLCLEAN(1) β like, the manual page but make it make sense
okay bestie, buckle up, because htmlclean is genuinely one of those tiny little scripts that Just Works and nobody talks about enough. it's a small script to clean up existing HTML, and honestly? underrated. π
β¨ SYNOPSIS β¨
htmlclean [-v] [-V] file1 [file2 file3 ...]
literally that's it. a couple flags, a pile of files, done. no cap. π¦
πΈ DESCRIPTION πΈ
so here's the vibe: this program is a command-line interface to the HTML::Clean module. what does that mean for you? it means you get HTML that's more compatible and smaller, and the tradeoff is that the HTML code itself gets less human-readable. and when I say smaller β in some cases you can shrink your HTML by up to 50%! ππ₯ like, half. gone. iconic.
the HTML::Clean library brings a bunch of features that improve your HTML for browsing and serving:
- removing whitespace, comments and other useless or redundant constructs π§Ή
- insuring that font tags work across multiple operating systems π
htmlclean passes each file you give it on the command line to the library, and writes out the new HTML according to the options you specified. the default behavior is to create a backup file and replace the file with cleaned HTML β so yeah, it edits in place. she's confident. she backs herself up first, thankfully. π
for full details, see the documentation for HTML::Clean itself. iykyk.
β¨ OPTIONS β¨
-Vβ prints the version of the program. cute, quick, done. β-vβ verbose mode, bestie. it prints out the original and final file sizes, plus the compression percent. for example:
5261 4065 22% /tmp/development-es.html
5258 4061 22% /tmp/development-fr.html
4651 3683 20% /tmp/development.html
look at those numbers go down. we love a glow-up. πβ¨
π¦ SEE ALSO π¦
for the library, see HTML::Clean β that's where all the actual magic lives, this script is just the friendly front door. π«Ά
π AUTHOR π
htmlclean is written by Paul Lindner, <paul.lindner@itu.int> β thank you for your service, king. π«‘
π COPYRIGHT π
Copyright (c> 1998 by ITU under the same terms as Perl. (yes, that's a c> β we're keeping it exactly as it is, no notes, it's canon. π)
ngl the whole energy here is "small script, big results." run it on a copy of your files if you're nervous, because the default will replace your file β but it makes a backup first, so breathe. π
and that's the tea, bestie. this page is from perl v5.42.3, dated 2019-09-13, and it's the HTMLCLEAN(1) manual page β go forth and minify. πΈπ
π
π¦ where this page comes from
- nixos 26.05: perl5.42.3-HTML-Clean 1.4
- nixpkgs unstable: perl5.42.3-HTML-Clean 1.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms