EXTRACT_USAGE_FROM_STX(1)
π extract_usage_from_stx β the manual page, bestie edition π
okay so this is the extract_usage_from_stx(1) page, and honestly? it's giving "tiny tool, big job" β¨
πΈ NAME πΈ
extract_usage_from_stx β extracts βUsage:β messages out of manpages that are written in Stx π
π SYNOPSIS π
extract_usage_from_stx [ file file ... ]
π¦ DESCRIPTION π¦
So here's the vibe: you hand it some files, and those files should be manpages written in Stx. It then goes through them and strips away everything that typically isn't part of a βUsage:β message. And if you give it no files at all? No worries bestie, it just reads standard input instead. π«Ά
Now, what even is a βUsage:β message? It's that thing a program prints at you when you call it with the wrong arguments, or when you specifically ask for help β like with a --help command line option. It's typically a subset of the info you'd find on that command's manual page. Like, the manpage is the whole outfit and the Usage message is the cute little going-out look. π
Here's what extract_usage_from_stx leaves in there:
- the command synopsis, exactly as given in the βSYNOPSISβ section π
- the command line options, exactly as given in the βOPTIONSβ section, plus the first sentence of their description. A sentence is taken to end at a period (
.). periodt. π
Heads up: the output is still in Stx format! So you might wanna further process it to actually produce the real βUsage:β message. It's the raw material, not the final glow-up. β¨
β¨ OPTIONS β¨
--version,-Vβ just show version information and exit π--help,-?β just show a short help message and exit π«Ά
π SEE ALSO π
stx2any (1)
π BUGS π
The end-condition of a sentence is too strong. yeah. that's it. that's the bug note. ngl it's a whole mood. π
π AUTHOR π
This manual page was written by Panu A. Kalliokoski. π«‘
and that's the whole page bestie!! written by Panu A. Kalliokoski, and this is extract_usage_from_stx() in section 1 β ily, go extract some usage messages, you're gonna slay πβ¨π¦
π¦ where this page comes from
- debian bookworm: stx2any 1.56-2.3
- ubuntu jammy: stx2any 1.56-2.2
- ubuntu noble: stx2any 1.56-2.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms