diff options
author | Jonas Smedegaard <dr@jones.dk> | 2024-10-08 20:39:52 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2024-10-08 20:39:52 +0200 |
commit | 601d1c576aa3287785f5c09098ea15836574e831 (patch) | |
tree | adb6b56c931b7cdd822cb4ada163ddce005d9ef5 | |
parent | ddcbdd5ec3eb29a99dd8bb95ee369297d507c7cd (diff) |
generate spiseseddel3 PDF and JPEG from SVG
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | _quarto.yml | 3 | ||||
-rwxr-xr-x | bin/svg+pdf+jpg.sh | 13 | ||||
-rw-r--r-- | tryk/spiseseddel3.jpg | bin | 916027 -> 0 bytes | |||
-rw-r--r-- | tryk/spiseseddel3.pdf | bin | 401359 -> 0 bytes |
5 files changed, 17 insertions, 1 deletions
@@ -1,2 +1,4 @@ /.quarto/ /_site/ +/tryk/spiseseddel3.pdf +/tryk/spiseseddel3.jpg diff --git a/_quarto.yml b/_quarto.yml index d1cd6b3..828838d 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -1,8 +1,9 @@ project: type: website + pre-render: + - bin/svg+pdf+jpg.sh tryk/spiseseddel3.svg post-render: - bin/pdfcompress.sh _site/tryk/oroeposten_3.pdf -# - bin/pdfcompress.sh _site/tryk/spiseseddel3.pdf website: title: Orøposten 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" diff --git a/tryk/spiseseddel3.jpg b/tryk/spiseseddel3.jpg Binary files differdeleted file mode 100644 index 754b6a5..0000000 --- a/tryk/spiseseddel3.jpg +++ /dev/null diff --git a/tryk/spiseseddel3.pdf b/tryk/spiseseddel3.pdf Binary files differdeleted file mode 100644 index a588f24..0000000 --- a/tryk/spiseseddel3.pdf +++ /dev/null |