Added a readme

This commit is contained in:
Price Hiller 2021-11-13 21:23:28 -06:00
parent 197e637da1
commit 8f0925fc8a

23
Misc/Templater.md Normal file
View File

@ -0,0 +1,23 @@
# Bash Templater
## Variable Types
All variables are used in the following format:
```
{#% VARIABLE_TYPE=data %#}
```
For example
```
{#% FILE=~/myfile.content %#}
```
- FILE
- File will read the content from the given file if it exists
- WRITE-TO
- This is used to tell the current process where to write to, only one should exist
in a template and sub-templates if multiple templates are chained together
- TEMPLATE
- This is used to parse the contents of another template and include the contents that are parsed.
For example, say we have a primary template `main.tmpl` that uses the sub-template `sub.tmpl` then
when the parsing process begins it will also parse the contents of `sub.tmpl` and append them to the contents
parsed by `main.tmpl`