#!/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"