Skip to content

robmosys/renderest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo is the companion source code for my article on Templating and Testing with BASH.

Usage

Given template.txt:

Hello, {{person}}!

Run:

$ person=Bob ./render template.txt

And you'll see the output

Hello, Bob!

Write it to a file by redirecting stdout to a file:

$ person=Bob ./render template.txt > rendered.txt

Or declare your variables in a file and then source it. Best done inside a script:

#!/usr/bin/env bash
source ./myvalues
./render template.txt > rendered.txt

Error out on empty env variables:

$ person= ./render --no-empty template.txt > rendered.txt

Testing

Just run:

./test-render

About

Way better than your average renderer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%