HXPRINTLINKS(1)

okay bestie, so this is hxprintlinks, part of the HTML-XML-utils squad, and she is so useful. think of her as the friend who, at the end of the group chat, drops a tidy numbered list of everyone's links so nobody has to scroll. πŸŽ€


✨ NAME ✨

hxprintlinks β€” adds a numbered list of links at the end of an HTML file πŸ’…


🌸 SYNOPSIS 🌸

hxprintlinks [ -b base ] file-or-URL

πŸ¦‹ DESCRIPTION πŸ¦‹

so what she does is literally this: she looks at the HTML file, finds every URL (every link) in there, and then adds a numbered list of all of them to the end of the file. that's it. that's the whole job. no cap. ✨

it's giving "bibliography but for hyperlinks." iconic behavior, honestly. πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

the following options are supported:

  • -b base β€” makes the URLs in the list absolute, using base as the base URL. (yes, only in the list. more on that drama in BUGS, bestie. 😭)

🌈 OPERANDS 🌈

the following operand is supported:

  • file-or-URL β€” the file to work on. now listen: if the argument is absent, OR if it's - (a single dash), then the document gets read from standard input. yes, the classic dash move. 🫢

πŸ’œ SEE ALSO πŸ’œ


πŸ’€ BUGS πŸ’€

okay so real talk, the -b option is probably of limited use. ngl it's a little bit of a flop. πŸ™ˆ

here's the tea: it makes the links in the generated list absolute, but it does NOT change the other links. so the rest of your document just sits there with its relative links, unbothered, unabsolute. πŸ’€

if you want a more flexible solution, you should run hxcopy(1) on the output of hxprintlinks. like, chain them. girlies love a pipeline. πŸ”₯

so, e.g., instead of:

hxprintlinks -b http://example.org/base/ myfile.html

use:

hxprintlinks myfile.html | hxcopy -i http://example.org/base -o .

periodt. that's the move. ⭐


okay that's the whole page, my love! this one came from the HTML-XML-utils collection, version 7.x, and the date on her birth certificate is 10 Jul 2011 β€” an absolute vintage queen who still eats. πŸ“ go forth and enumerate those links bestie, mwah πŸ’–πŸ§šβœ¨