From d7c3c0be63e45f9bb1d02aecd1177066a72f43d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BChlinghaus?= Date: Tue, 23 Jun 2026 00:23:40 +0200 Subject: [PATCH] Automatische erstellung eines PDFs --- .gitignore | 1 + build-pdf.sh | 8 ++++++++ style.css | 13 +++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 .gitignore create mode 100755 build-pdf.sh create mode 100644 style.css diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c62f4c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +buch.pdf diff --git a/build-pdf.sh b/build-pdf.sh new file mode 100755 index 0000000..6387a87 --- /dev/null +++ b/build-pdf.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +docker run --rm -v "$(pwd):/data" --user $(id -u):$(id -g) \ + fpod/pandoc-weasyprint \ + akt*/*.md \ + --pdf-engine=weasyprint \ + --css=/data/style.css \ + -o /data/buch.pdf diff --git a/style.css b/style.css new file mode 100644 index 0000000..ff2cc9e --- /dev/null +++ b/style.css @@ -0,0 +1,13 @@ +@page { + size: A5; + margin: 1.5cm; +} +body { + font-family: Arial, sans-serif; + font-size: 10pt; + line-height: 1.6; +} +h1 { + break-before: page; +} +