This repo contains jinjanator-plugin-format-toml
, a plugin which
provides a TOML parser for the
jinjanator tool.
Open Source software: Apache License 2.0
This plugin allows jinjanator to parse TOML data for processing in
templates. The format can be selected using --format toml
or
autoselected by using a data file with a name ending with .toml
.
pip install jinjanator-plugin-format-toml
Suppose you have an NGINX configuration file template, nginx.j2
:
server {
listen 80;
server_name {{ nginx.hostname }};
root {{ nginx.webroot }};
index index.htm;
}
And you have a TOML file with the data, nginx.toml
:
[nginx]
hostname="localhost"
webroot="/var/www/project"
This is how you render it into a working configuration file:
$ jinjanate nginx.j2 nginx.toml > nginx.conf
This format does not support any options.
If you'd like to chat with the jinjanator community, join us on Matrix!
"Standing on the shoulders of giants" could not be more true than it is in the Python community; this project relies on many wonderful tools and libraries produced by the global open source software community, in addition to Python itself. I've listed many of them below, but if I've overlooked any please do not be offended :-)