diff options
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" |