From 8f0925fc8ad9765728c70547080240a9ea880b4c Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sat, 13 Nov 2021 21:23:28 -0600 Subject: [PATCH] Added a readme --- Misc/Templater.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Misc/Templater.md diff --git a/Misc/Templater.md b/Misc/Templater.md new file mode 100644 index 0000000..84eb6f9 --- /dev/null +++ b/Misc/Templater.md @@ -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`