Notebook.sh: Difference between revisions

From XPUB & Lens-Based wiki
(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:
WIKIPAGE=""
The script below uses [[User:Manetta/Booklet-stylesheet.css]] as a stylesheet to render a PDF from a wiki page.
 
curl https://pzwiki.wdka.nl/mediadesign/$WIKIPAGE?action=raw > $WIKIPAGE.mediawiki
<syntaxhighlight lang="bash">
WIKIPAGE=""
pandoc --from mediawiki --to html $WIKIPAGE.mediawiki --css https://pzwiki.wdka.nl/mediadesign/User:Manetta/Booklet-stylesheet.css?action=raw --output $WIKIPAGE.html
 
curl https://pzwiki.wdka.nl/mediadesign/$WIKIPAGE?action=raw > $WIKIPAGE.mediawiki
weasyprint $WIKIPAGE.html --stylesheet https://pzwiki.wdka.nl/mediadesign/User:Manetta/Booklet-stylesheet.css?action=raw $WIKIPAGE.pdf
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
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