diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2024-09-29 15:27:01 +0200 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2024-09-29 15:28:52 +0200 |
commit | 814f4e6a3e28c06bd60e53171748721ae365c2da (patch) | |
tree | 98825de0c053a986d755895b8a301ed26f414a7a /invoice-gen | |
download | paperwork-814f4e6a3e28c06bd60e53171748721ae365c2da.tar.gz |
init: invoice-gen and examplestrunk
Diffstat (limited to 'invoice-gen')
-rwxr-xr-x | invoice-gen | 14 |
1 files changed, 14 insertions, 0 deletions
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" |