Skip to main content
Version: 0.5.x

How it works

For every file the following steps are performed:

1. Read fileโ€‹

The file is read from the filesystem and stored in memory.

> cat foobar.txt
The answer is ${{ยด40+2ยด}}
$[ifeq foo bar]$
Hello ${{foo}}$
$[else]$
Bye
$[end]$

2. Apply templateโ€‹

The commands will be evaluated and applied to the file.

> utpp --no-vars foobar.txt foo=bar
The answer is ${{ยด40+2ยด}}
Hello ${{foo}}$

3. Apply variablesโ€‹

The variables are applied to the template. The variables are a key-value pair that contains the values to replace in the template.

> utpp foobar.txt foo=bar
The answer is 42
Hello bar

4. Write fileโ€‹

The file is written to the filesystem or to the standard output depending on the cli arguments.