--- context --- desc: cargo metadata --format-version=1 --no-deps | jq -r .packages[0].description usage: cargo run --quiet -- --help | sed 's/\s*$//' example: hello: src: cat examples/hello.hms out: cargo run --quiet -- examples/hello.hms context: cat examples/hello/context template: cat examples/hello/template cargo: src: cat examples/cargo.hms out: cargo run --quiet -- examples/cargo.hms --- template --- # Handlematters {{desc}} ## Introduction Handlematters is a template system that combines Handlebars and shell scripts. It is intended to replace simple substitution tasks such as those done by envsubst. Here is an example of a Handlematters template: ``` {{{example.hello.src}}} ``` Passing this file to handlematters will result in the following output: ``` $ handlematters hello.hms {{{example.hello.out}}} ``` Let's take a closer look. ``` {{{example.hello.context}}} ``` The `context` block is a YAML document. Each value of the property will be executed as a shell script and the output will be the resulting value. ``` {{{example.hello.template}}} ``` The `template` block is a Handlebars template. `\{{...}}` to output the context value. If you are not familiar with Handlebars syntax, have a look at https://handlebarsjs.com/. Let's look at a more practical example: ``` {{{example.cargo.src}}} ``` Will result in: ``` {{{example.cargo.out}}} ``` Of course, this README is also generated by Handlematters. See: https://github.com/ursm/handlematters/blob/main/README.md.hms ## Usage ``` {{{usage}}} ```