Notebook.sh
The script below uses curl
, pandoc
, weasyprint
, pdfbook2
and User:Manetta/Booklet-stylesheet.css as a stylesheet to render a PDF from a wiki page.
WIKIPAGE=""
curl https://pzwiki.wdka.nl/mediadesign/$WIKIPAGE?action=raw > $WIKIPAGE.mediawiki
pandoc --from mediawiki --to html $WIKIPAGE.mediawiki --css https://pzwiki.wdka.nl/mediadesign/User:Manetta/Booklet-stylesheet.css?action=raw --output $WIKIPAGE.html
weasyprint $WIKIPAGE.html --stylesheet https://pzwiki.wdka.nl/mediadesign/User:Manetta/Booklet-stylesheet.css?action=raw $WIKIPAGE.pdf
pdfbook2 --paper=a4paper --short-edge --no-crop $WIKIPAGE.pdf