Tool to run Mustache library on scheme data and template
Uses excellent (arvyy mustache) library and is just a handy wrapper for that.
## Installation
snow-chibi install --impls=chibi retropikzel.scm-mustache
## Usage
Read data from file
scm-mustache data.scm template.html
Read data from stdin
scm-mustache - template.html
Concatenate multiple template files
scm-mustache data.scm header.html body.html footer.html
## Example
data.scm:
((title . "Favorite colors")
(colors .
#(((name . "John") (color . "green"))
((name . "Jane") (color . "blue"))
((name . "Mike") (color . "red")))))
template.html:
{{title}}
{{#colors}}
{{/colors}}
scm-mustache data.scm template.html
Output:
Favorite colors