instant(1)
β¨ NAME β¨
instant β bestie, this one manipulates ESIS from a parsed SGML instance. That's the whole vibe. π
π SYNOPSIS π
instant [ -bhuvxHISW ] [ -t file] [ -s file] [ -c file] [ -o file]
[ -D variable=value ...] [ -i id] [ -l directory] [file]
π¦ DESCRIPTION π¦
Okay so instant is the program that takes an SGML document instance and does stuff to it β like a whole variety of ways, no cap. It can translate it into a form that a formatting application can actually use, and it can also print information about the instance. Two totally different moods, one icon. π
The input to instant is the output of onsgmls, and that format is called Element Structure Information Set (ESIS). That's the name, remember it, it comes up again.
π FLAGS π
These are all the possible command line options for instant, bestie. Unless it says otherwise, output goes to the standard output. π€
-t fileβ Translate the SGML instance into another form, usually one that a formatting application can vibe with. Thatfileis called a translation spec, and it says how the tags should get translated. Peeptranspec(5)for that. By convention, names forfileuse the suffix.ts, for translation spec. β¨-s fileβ Points at a file of mappings for SDATA entities in the instance. The file has two columns, separated by one or more tabs. Lowkey important: spaces can not be used as the separator, because spaces are allowable as the content of the columns. π The first column is the entity data to map, the second is the string that the data is mapped to. The entity data is typically what's found in public ISO entity sets, like the General Technical and Publishing sets. These mappings are specific to whichever formatting application you're using. Example: to map the em dash entity,[mdash ], in the Publishing set to the TeX representation, the first column would be[mdash ]and the second column---. Lines beginning with a#are comments and get ignored, and empty lines are also ignored. π«Ά-c fileβ Points at a file of string mappings for characters in the instance. Two columns again, but this time separated by white space. First is the character to map, second is the string that the character is mapped to. Again, these mappings are specific to the formatting application used. Lines beginning with a#are comments and are ignored, empty lines too. π-dβ strip newline at the beginning of data records-f lengthβ Set the threshold for the length, in characters, of an<Entry>, over which it is called a block of filled text, tolength.-o fileβ Write all output (except error and warning messages) tofile. By default, output goes tostdout. π-hβ Print a text representation of the hierarchy of the instance elements. The deeper an element is in the tree, the more it is indented. The data content is not printed. π³-uβ Print a summary of the usage of each element in the instance. The info given includes attributes, number of children, and depth in the hierarchy. So much lore. π-Sβ Print some statistics about element usage in the instance, including how often each element is used and how much PCDATA is contained. Numbers girlies rise up. π’-xβ Print the context of each element in the instance, from each element all the way to the root of the document tree. Ancestry reveal. π-vβ Validate the SGML instance based on the set of constraints or descriptions in the transpec file. This flag tellsinstantto turn off normal output, leaving only diagnostics. π©Ί-l directoryβ Try to read the translation specs or other files from inside thedirectoryif they're not found in the current directory. This is called the library directory. The environment variableTPT_LIBmay also be used to specify this. π-bβ Interactive browser mode. The user gets prompted for actions, which include moving among and examining the various nodes in the hierarchy of the instance, displaying information about them, etc. It's giving choose-your-own-adventure. πΉοΈ-Iβ List the IDs of all elements in the instance that have an ID. The format is more suitable for other programs than for humans, ngl. Lines show the ID, element GI, filename, and line, separated by colons. (This depends on the-loption toonsgmlswhich provide filenames and line numbers.) π€-i idβ When translating the instance, begin processing at the element whose ID isidinstead of the topmost element. Skip to the good part. βοΈ-D variable=valueβ Define the variablevariablewith valuevalue.-Wβ Do not print warning messages. π€«-Hβ Print a help message briefly describing the options. πfileβ Read the instance from the filefile. This is expected to be the output of the programonsgmls. If not specified,instantreads the instance from its standard input.
β οΈ Okay real talk: in some cases it makes no sense to combine options. This is especially true if one of the options is to perform a translation. And no checking is done for this. So like... be responsible. No cap. π
π§ INTERACTIVE BROWSER π§
These are the commands to the interactive browser, bestie:
cd args ...β Change to a different element in the hierarchy.cd id idwill change to the element whose ID isid.cd Nwill change to the Nth child element of the current element. Several values ofNmay be specified, so the program will change to successively descending elements in the hierarchy. The string..may appear forNto move up a level in the hierarchy (like in a unix file system). A/may be specified forNto change to the top of the hierarchy. π§contβ Print the context of each element.data Nβ Show the data content (PCDATA, RCDATA, and DATA) of child nodeN. πfind specβ Find paths to elements matchingspec, wherespecmay be one of:parent giβ Find all elements whose parent element isgi.child giβ Find all elements which have a child elementgi.gi giβ Find all elements whose name isgi.attr name valueβ Find all elements that have a attributenamethat have a valuevalue.
id IDβ Show location of element whose ID isID. IfIDis?, it will list all IDs with the paths to them. πlsβ List information about the current element in the hierarchy. This includes element name, line number in instance, context, attributes and their values, child elements, data directly within this element, and the order of the current element among its siblings. Full dossier energy. πq relation elementβ Report whether or not the current element has the relationrelationto the named elementelement. Values ofrelationare the same as for_followrelin transpec reference page. π€statβ Show statistics about the hierarchy. πsumβ Show a tag usage summary about the hierarchy. π·οΈtran transpec outfileβ Write translated output using trans spectranspecto fileoutfile. Ifoutfileis not specified, output is sent tostdout. πΎtreeβ Print a textual representation of the hierarchy of the instance, where deeper elements are indented more. π²whereβ Show current position in the hierarchy. π<control-D>β Exits the program. bye bestie π
The stat, sum, tree, cont commands take an optional first argument (of any value), which means to only consider the entire instance instead of the hierarchy from the current element.
πΈ FILES πΈ
file.tsβ Translation specification file. β¨file.sdataβ SDATA entity mapping file. π¦file.cmapβ Character mapping file. π
π RELATED INFORMATION π
transpec(5), onsgmls(1), Standard Generalized Markup Language (SGML), ISO 8879. Go read 'em, iykyk. π
And that's the whole page, babe β brought to you from the user cmd corner of the manual set. Stay iconic, go parse something. πβ¨
π¦ where this page comes from
- debian bookworm: docbook-to-man 1:2.0.0-45 Β· MIT
- debian trixie: docbook-to-man 1:2.0.0-48 Β· MIT
- ubuntu jammy: docbook-to-man 1:2.0.0-45 Β· MIT
- ubuntu noble: docbook-to-man 1:2.0.0-46 Β· MIT
- ubuntu questing: docbook-to-man 1:2.0.0-48
- ubuntu resolute: docbook-to-man 1:2.0.0-50 Β· MIT
- ubuntu stonking: docbook-to-man 1:2.0.0-50 Β· MIT
- Copyright (c) 1994 Open Software Foundation, Inc
- Copyright (c) 1996 X Consortium
- Copyright (c) 1996 Dalrymple Consulting
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms