From 814f4e6a3e28c06bd60e53171748721ae365c2da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Sun, 29 Sep 2024 15:27:01 +0200 Subject: init: invoice-gen and examples --- invoice-gen | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 invoice-gen (limited to 'invoice-gen') diff --git a/invoice-gen b/invoice-gen new file mode 100755 index 0000000..b82050c --- /dev/null +++ b/invoice-gen @@ -0,0 +1,14 @@ +#!/bin/sh + +set -xe + +test -f "${1}" +filename="$(echo "${1}" | rev | cut -d "." -f 2- | rev)" +template="templates/template.gohtml" + +gomplate \ + -c data="${1}" \ + -c translations=templates/translations.yml \ + -f "${template}" \ + | tee "${filename}.html" \ + | weasyprint - "${filename}.pdf" -- cgit v1.2.3