EXTRACT_USAGE_FROM_STX(1)

πŸ“¦ version 1.56, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– 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