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:
-ffieldname β 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
- (c) 2018-2021 Michael Baeuerle
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms