SGMLPRE(1)

πŸ“¦
version 0.9.86 Β· 2 versions
, in arch rolling, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– SGMLPRE(1) πŸ’–

okay bestie, gather round, because today we're talking about sgmlpre β€” the little utility that handles SGML conditionalization for SGML-tools. it lives in section 1 of the manual, so yes, it's a user command, even if it's lowkey a behind-the-scenes gremlin. πŸ¦‹


✨ SYNOPSIS ✨

sgmlpre [options] ...

that's it. that's the whole vibe. 🌸


πŸŽ€ DESCRIPTION πŸŽ€

so this manual page gives you the brief lil rundown of the sgmlpre commands. and here's the tea: it was written specifically for the Debian GNU/Linux distribution because the original program literally does not ship with a manual page for sgmlpre. so someone had to step up. and they did. main character energy fr. πŸ’…

sgmlpre is a program that handles SGML conditionalization for SGML-tools.

it gets used by other programs in sgml-tools (v1), which means usually a normal user does not need to use this program directly by themselves. it's a background bestie, not a front-and-center one. no cap. 🫢

what follows is quoted straight from the header in the source code. yes, we're citing our sources, we're academically honest in this house. πŸ“š

(Begin Quotes) sgmlpre -- handle SGML conditionalization for SGML-tools by Eric S. Raymond <esr@thyrsus.com>, 3 Nov 1997 Filter SGML according to conditionalizing markup. Argument/value pairs from the command line are matched against the attributes of <#if> and <#unless> tags. Spans between <#if>/</#if> are passed through unaltered if there is no attribute mismatch; spans between <#unless></#unless> are passed if there is at least one attribute mismatch. An attribute mismatch happens if an attribute occurs in both the command-line arguments and the tag, but the values do not match. Value matching is by string equality, except that "|" is interpreted as an alternation character. Even if a span is not passed through, its newlines are (this to avoid messing up the line numbers in error messages). This lexer requires flex. Limitations; attribute names may only be 256 chars long, values may be only 16384 (YY_BUF_SIZE) characters long. Doesn't do checking that only </if> matches <if> and </unless> matches <unless> (that would need a stack and introduce another limit). (End Quotes)

so yeah. the way that <#if> and <#unless> tags work is honestly kind of iconic once it clicks. πŸ’‘ and yes, the 256-char attribute names and 16384-char values are hard limits, not suggestions. and it does not check that </if> only matches <if> and </unless> only matches <unless> β€” the header is very clear that doing that would need a stack and would introduce yet another limit. so it just... doesn't. periodt. πŸ’€


πŸ’… OPTIONS πŸ’…

okay so about flags. the program does not support normal command line options. that's the whole section. it's giving minimalism, it's giving "i simply do not do that." πŸ™ˆ


🌈 SEE ALSO 🌈

  • for a complete description, see the header in the source archive. that's where the real lore lives. go read it bestie. πŸ“–

πŸ‘‘ AUTHOR πŸ‘‘

sgmlpre was written by Eric S. Raymond <esr@thyrsus.com>, 3 Nov 1997. a legend, honestly. ⭐

this manual page was written by Taketoshi Sano <sano@debian.org>, for the Debian GNU/Linux system (but may be used by others β€” sharing is caring, we love a generous license vibe πŸ’–).

currently maintained by Agustin Martin <agustin6martin AT gmail com>. keeping the dream alive fr fr. 🌸


and that's a wrap, bestie!! πŸŽ€ this page is from the General Commands Manual, source and version SGMLPRE(1), dated 1997-11-03. go forth and conditionalize responsibly. slay. πŸ’…βœ¨πŸ¦‹