Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

goj2

CLI tool for Jinja2 template rendering based on pongo2. Loosely inspired by j2.

DISCLAIMER: first app with Golang, so please excuse the copy-pasta or big mistakes. I wanted a lightweight j2 tool to render my environment variables on my Ansible (jinja2) templates.

Usage

usage: goj2 [inputfile]

It will output a rendered Jinja2-compatible template using the environment variables (I'm looking at you, docker).

e.g.

$ cat > /tmp/mytemplate.txt.j2 << EOF
Hello {{ WORLD }}
EOF
$ ./goj2 /tmp/mytemplate.txt.j2
Hello

$ WORLD='World!' ./goj2 /tmp/mytemplate.txt.j2
Hello World!

About

CLI tool for Jinja2 template rendering based on pongo2

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages