From 601d1c576aa3287785f5c09098ea15836574e831 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 8 Oct 2024 20:39:52 +0200 Subject: generate spiseseddel3 PDF and JPEG from SVG --- bin/svg+pdf+jpg.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 bin/svg+pdf+jpg.sh (limited to 'bin') diff --git a/bin/svg+pdf+jpg.sh b/bin/svg+pdf+jpg.sh new file mode 100755 index 0000000..9d6edc4 --- /dev/null +++ b/bin/svg+pdf+jpg.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +set -eu + +INFILE=$1 +DIR=$(dirname "$INFILE") +STEM=$(basename "$INFILE" .svg) + +[ -n "$QUARTO_PROJECT_RENDER_ALL" ] || exit + +inkscape --export-type=pdf,png --export-width=1800 "$INFILE" +ffmpeg -hide_banner -loglevel warning -y -i "$DIR/$STEM.png" -update 1 -frames:v 1 "$DIR/$STEM.jpg" +rm "$DIR/$STEM.png" -- cgit v1.2.3