8. MiST Engine Command Line Tool Reference

mist_engine - a tool for template-based file generation.

Usage:

mist_engine [options] {path_to_template(s)} {value_file}

Options:

-s, --simplified-mode

Operate in simplified mode: process a single template rather than a template group and output the result to stdout.

--version

Display version information and then exit.

--help

Display this information and then exit.

mist_engine works as follows. It loads the specified templates and value file and then creates output files based on the loaded templates and that data.

mist_engine tool can operate in regular mode or in simplified mode.

In the regular mode, path_to_template(s) argument should specify the directory from which a group of templates is to be loaded. The main template in the group and the .cfg file for it should have the same name as the directory. The template of the path to the output file should be specified in the .cfg file in FILE_PATH_TEMPLATE parameter (see Section 4, “Template Groups and Subtemplates” for details).

The path to the output file will be constructed by the engine first. After that, the result of the evaluation of the template group will be stored in that file. In the most simple case, the value of FILE_PATH_TEMPLATE parameter can be something like output.dat instructing the tool to store the results in output.dat file in the current directory.

Begin and end markers of placeholders in the templates could also be specified in the .cfg file for the template group although this is not mandatory. The default ones are <$ and $>.

In the simplified mode, a single template is evaluated and the result is output to stdout. The template is loaded from the file specified by path_to_template(s) argument. The template is assumed to use the default begin and end markers of placeholders.

Note

Note that mist_engine tool is self-contained: it does not depend on MiST Engine dynamic library and thus can be used and distributed on its own.