From b640ed0c42877f811e9aa0e89ec52436fc7082dd Mon Sep 17 00:00:00 2001 From: mb Date: Tue, 6 Feb 2024 15:04:31 +0100 Subject: [PATCH] adding the changes Thijs made to the booklet.sh script --- booklet.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/booklet.sh b/booklet.sh index cda8981..11d74c8 100644 --- a/booklet.sh +++ b/booklet.sh @@ -34,11 +34,12 @@ rm booklet-stylesheet.css.tmp # Turn the HTML page into a PDF with weasyprint # --------------------------------------------------------------- -echo ">>> generating $WIKIPAGE.pdf (with weasyprint)" -weasyprint https://pzwiki.wdka.nl/mediadesign/$WIKIPAGE?action=render --stylesheet booklet-stylesheet.css $WIKIPAGE.pdf +PDFNAME=$(echo "$WIKIPAGE" | tr :/#%{}\&\\\<\>*?/\!\'\"@+\`= _) +echo ">>> generating $PDFNAME.pdf (with weasyprint)" +weasyprint https://pzwiki.wdka.nl/mediadesign/$WIKIPAGE?action=render --stylesheet booklet-stylesheet.css $PDFNAME.pdf # And turn the PDF into an A5 booklet PDF for printing # --------------------------------------------------------------- # pdfbook2 is part of the texlive-extra-utils package in Debian -echo ">>> generating $WIKIPAGE-book.pdf (with pdfbook2)" -pdfbook2 --paper=a4paper --short-edge --no-crop $WIKIPAGE.pdf +echo ">>> generating $PDFNAME-book.pdf (with pdfbook2)" +pdfbook2 --paper=a4paper --short-edge --no-crop $PDFNAME.pdf