HTMLCLEAN(1)

πŸ“¦ version 1.4, in nixos 26.05, nixpkgs unstable

πŸ’… 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 (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