README.md

Templator

Templator is an engine for processing templates with data files. The templates and data files both use ERB to give users as much power and control over their templates as possible. Data files are read using YAML format to ensure the readability of the data.

Examples

If we create a file named template.txt.erb with the following contents:

Hello World! It is <%= Time.now %>

then run Templator with:

./templator template.txt.erb

We see output similar to:

Hello World! It is 2011-05-20 11:28:45 -0600

Data Files

Here's a more complex example using a data file. If we create a yaml file called data.yaml with the following contents: