UNHTML(1)

πŸ’– unhtml(1) β€” the general commands manual, but make it cute πŸ’–

okay bestie, gather round, because unhtml is literally the moment 🫢 it's a little command that lives in section 1 of the manual (yep, the general commands manual, iykyk), and it does exactly one thing but it does it so well.


✨ NAME ✨

unhtml β€” strip the HTML formatting from a document or the standard input stream and display it to the standard output

like. it takes the html away. that's the whole job. and honestly? iconic.


🌸 SYNOPSIS 🌸

unhtml -version | [ filename ]

that's it. that's the whole vibe. either you ask it for its version, or you hand it a filename. no in-between, no chaos. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: unhtml parses text that it reads from the standard input β€” or from a file, if you gave it a filename β€” and it removes any HTML formatting it finds in there. bye bye tags. not a crumb left. 🧚

then it prints the resulting cleansed text to the standard output, which is perfect for easy redirection. you want it in a file? redirect it. you want it piped somewhere? pipe it. it's giving flexible, honestly.

and listen β€” the version included with this man page has been improved to handle comments and scripts. so it's not out here getting fooled by <!-- ... --> or <script> blocks. no cap, it ate that. πŸ”₯


πŸ’… OPTIONS πŸ’…

  • -version β€” Version. unhtml will display its version and exit. that's it, that's the one option, and it's a diva about it πŸ‘‘

⭐ EXAMPLES ⭐

okay so this example simply scans a file called "index.html" and prints the file to the standard output with the HTML formatting removed. the standard output is redirected to a file called "index.txt", which β€” after running β€” will contain the plain text of the .html file. slay. ✨

example% unhtml index.html > index.txt

look at that little redirect go. main character energy. πŸŽ€


😭 BUGS 😭

currently, if the output is redirected to a file of the same name as the input file, the result will be an empty file of the same name πŸ’€

but bestie, this is really an idiosyncracy of the redirect operator, and it cannot be corrected in the program. so like. not our girl's fault. the redirect did that. πŸ™ˆ

🌈 DEVELOPMENT 🌈

This document is Copyright (C) 1998 by Kevin Swan. respect the elders, they built the vibes. 🫢


and that's the whole page, bestie!! unhtml, from the General Commands Manual, dated 3 February 1998 β€” shoutout to that date and to UNHTML(1) for being a real one. go cleanse some text. periodt. πŸ’œ