output templates
The nits.format switch allows control of output format. It takes a file name. The format of that text file is a sequence of fixed section names, enclosed in square brackets on their own lines, each optionally followed by text. In that text, certain specific identifiers, enclosed in brace pairs, are substituted. For example:
[dog-section]
My dog {{dog-name}} is a {{bad-dog}}.
For examples, browse recipe/toast/output/*.nit in the source.
If no file is specified, or if the file cannot be loaded, a default template is used.
Note also the nits.quote switch.
Dylan Harris
December 2024