canlock-mhp(1)

πŸ’Œ canlock-mhp β€” bestie's guide to the message header parser

okay so real quick β€” this page lives in the canlock-hp 3.3.2 manual, and it's literally just the CLI frontend for the libcanlock library. that's the whole vibe. let's get into it 🫢


✨ NAME ✨

canlock-mhp β€” CLI frontend for libcanlock library. yes that's it, that's the whole name section, she's short and she knows it πŸ’…


🌸 SYNOPSIS 🌸

canlock-mhp -h | -v

canlock-mhp -f fieldname

two modes, no in-between. help/version girlie, or field-name girlie. pick your fighter πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

Message Header Parser (mhp) for RFC5536 conformant Netnews articles. that's the official job title, put some respect on it πŸ‘‘

The name of a single header field must be specified with the -f option. one field. singular. not a buffet, bestie πŸ™ˆ

The message in canonical format (with US-ASCII encoded CRLF line breaks) is read from stdin. and here's the part people always trip on β€” if your message is in some local format (e.g. EBCDIC encoded or with LF line breaks), it must be converted to canonical format before it can be used as input. like, you gotta do the conversion yourself, this tool is not your converter, she is a parser πŸ’€

The input data may be a naked header without message body, but the empty line separator after the header must always be present. don't skip the blank line. the blank line is the moment, the blank line is the main character. 😭

The syntax of the extracted header field is not checked beyond the folding. so don't come here expecting full validation, she's not doing that. The rest of the message need not be fully RFC5536 conformant too, as long as all header fields start on new lines (and are correctly folded, so that there is no ambiguity). Common syntax errors (like 8-bit characters in the header) are ignored. lowkey forgiving, highkey iconic ✨

If the specified header field is found, it is extracted, unfolded and printed to stdout (without trailing line break). no trailing newline. nope. not even one. πŸŽ€

If there are multiple header fields with the specified name, the first one is used. first come, first served, that's the rule 🏁


πŸ’… OPTIONS πŸ’…

The following options are supported:

  • -f fieldname β€” Specify the header field name to search for (without the colon). no colon, bestie, leave the colon at home 🚫
  • -h β€” Print help message, then exit. the classic "what does anything do" button 🫢
  • -v β€” Print version and compile time options, then exit. compile time options!! she's showing off her build config, we love a transparent queen πŸ‘‘

πŸ”₯ EXIT STATUS πŸ”₯

Zero on success or regular exit respectively. All other values indicate an error.

so like, 0 = slay, anything else = something went sideways 😭


πŸ’– AUTHORS πŸ’–

Michael Baeuerle β€” the icon, the legend, the author 🫑


🌈 REPORTING BUGS 🌈

Report bugs to <mailto:michael.baeuerle@gmx.net>. found a bug? email it, don't just vague-post about it πŸ’Œ


⭐ STANDARDS ⭐

canlock-mhp tries to comply with the following standards:

"tries to" β€” we respect the honesty ngl 🧚


πŸ“ SEE ALSO πŸ“

go read those too, the lore is deep iykyk πŸ“š


heads up bestie: remember the empty line after the header. i'm not kidding. it's non-negotiable. the blank line is load-bearing πŸ’€

okay and finally, the cute sign-off: this page is from the Unix corner of the world, dated 2024-05-11, and yes she's serving vintage-but-current. periodt. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from
  • epel 10: canlock 3.3.3-2.el10_3 Β· BSD-3-Clause AND NLPL AND ICU
  • πŸ“œ the page's license: ICU
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms