Notebook.sh: Difference between revisions
(Created page with " 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") |
No edit summary |
||
Line 1: | Line 1: | ||
The script below uses [[User:Manetta/Booklet-stylesheet.css]] as a stylesheet to render a PDF from a wiki page. | |||
<syntaxhighlight lang="bash"> | |||
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 | |||
</syntaxhighlight> |
Revision as of 15:18, 21 November 2023
The script below uses 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