From a5e4dc8fe418d65fb51aff18ab65a0287de75087 Mon Sep 17 00:00:00 2001 From: kev Date: Tue, 15 Oct 2024 12:26:38 +0800 Subject: [PATCH] add jinjanator --- README.md | 1 + jinjanator/Dockerfile | 19 +++++++++++++++++++ jinjanator/README.md | 14 ++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 jinjanator/Dockerfile create mode 100644 jinjanator/README.md diff --git a/README.md b/README.md index d8552d7..497e741 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,7 @@ A collection of delicious docker recipes. ## Utility - [x] dbatools +- [x] jinjanator - [x] registry-cli - [x] tldextract diff --git a/jinjanator/Dockerfile b/jinjanator/Dockerfile new file mode 100644 index 0000000..22cf43b --- /dev/null +++ b/jinjanator/Dockerfile @@ -0,0 +1,19 @@ +# +# Dockerfile for jinjanator +# + +FROM alpine:3.20 +MAINTAINER EasyPi Software Foundation + +RUN set -xe \ + && apk add --no-cache py3-pip \ + && mkdir -p ~/.config/pip/ \ + && echo -e '[global]\nbreak-system-packages = true' > ~/.config/pip/pip.conf \ + && pip3 install jinjanator \ + jinjanator-plugin-ansible \ + jinjanator-plugin-format-toml \ + jinjanator-plugin-format-xml \ + && jinjanate --version + +ENTRYPOINT ["jinjanate"] +CMD ["--help"] diff --git a/jinjanator/README.md b/jinjanator/README.md new file mode 100644 index 0000000..22bac0c --- /dev/null +++ b/jinjanator/README.md @@ -0,0 +1,14 @@ +jinjanator +========== + +[jinjanator][1] is a CLI tool to render Jinja2 templates. + +```bash +$ alias jinjanate='docker run --rm -v $PWD:/tmp -w /tmp vimagick/jinjanator' +$ echo '{{ name }}{{ age }}' > person.xml.j2 +$ echo '{"name":"Andrew", "age":31}' > person.json +$ jinjanate person.xml.j2 person.json +Andrew31 +``` + +[1]: https://github.com/kpfleming/jinjanator