pushing the booklet.sh + additional files to the git repo
commit
f97da16b06
Binary file not shown.
@ -0,0 +1,89 @@
|
|||||||
|
@page{
|
||||||
|
size: A5;
|
||||||
|
margin: 5mm 8mm;
|
||||||
|
}
|
||||||
|
@page:first{
|
||||||
|
background: url(./hershey-text-extension.svg);
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
font-size: 9px;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
div#toc{
|
||||||
|
columns: 2 auto;
|
||||||
|
}
|
||||||
|
div#toc ul{
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
div#toc ul li{
|
||||||
|
margin: 0;
|
||||||
|
margin-left: 1.5em;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
div#toc h2#mw-toc-heading{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
div#toc ul li span.tocnumber{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
pre{
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
div.thumb{
|
||||||
|
width: 50mm !important;
|
||||||
|
max-width: 50mm;
|
||||||
|
float: right;
|
||||||
|
margin: 0 0 1em 1em;
|
||||||
|
/* break-inside: avoid; */
|
||||||
|
max-height: 50mm;
|
||||||
|
}
|
||||||
|
div.thumbinner{
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
img{
|
||||||
|
width: 50mm;
|
||||||
|
max-height: 50mm;
|
||||||
|
}
|
||||||
|
div.thumbcaption{
|
||||||
|
font-size: 8px;
|
||||||
|
width: 50mm;
|
||||||
|
}
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
break-after: avoid;
|
||||||
|
}
|
||||||
|
h2:first-of-type{
|
||||||
|
font-size: 400%;
|
||||||
|
border: 5px groove;
|
||||||
|
border-radius: 25px;
|
||||||
|
padding: 0.15em 0.75em 0.5em;
|
||||||
|
break-after: always;
|
||||||
|
}
|
||||||
|
h2{
|
||||||
|
font-family: "line";
|
||||||
|
font-size: 300%;
|
||||||
|
text-align: center;
|
||||||
|
border-top: 1px solid;
|
||||||
|
border-radius: 50%;
|
||||||
|
line-height: 1;
|
||||||
|
padding-top: 0.5em;
|
||||||
|
margin-top: 1.25em;
|
||||||
|
}
|
||||||
|
hr{
|
||||||
|
border: 0;
|
||||||
|
border-top: 0.5px solid black;
|
||||||
|
}
|
||||||
|
a{
|
||||||
|
font-family: sans-serif;
|
||||||
|
color: black;
|
||||||
|
text-decoration: none;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
body:after{
|
||||||
|
content:"This booklet is printed for the *plotter party* at the XPUB studio on Monday 27 November 2023. Printed on default paper from the Canon machines at the PZI/WdKA, compiled with User:Manetta/Booklet.sh using the *Pen plotters* PZI wiki page (https://pzwiki.wdka.nl/mediadesign/Pen_plotters) and Weasyprint. The header font that is used is *Compagnon*, by Juliette Duhé, Léa Pradine, Valentin Papon, Chloé Lozano, Sébastien Riollier. Distributed by velvetyne.fr; and the background image at the cover is made with the *Hershey Text* stroke font Inkscape extension! The other fonts are default browser fonts ;). © XPUB, November 2023 🄯 Copyfarleft under the terms of the Peer Production License (only other commoners, cooperatives and nonprofits can share and re-use the material).";
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: "line";
|
||||||
|
src: url(Compagnon-LightItalic.otf);
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Capturing the wiki page
|
||||||
|
# ---------------------------------------------------------------
|
||||||
|
# the wiki page that you wrote as an argument in the command line,
|
||||||
|
# is stored in this variable
|
||||||
|
WIKIPAGE=$1
|
||||||
|
echo ">>> making a booklet from the wiki page: $WIKIPAGE"
|
||||||
|
|
||||||
|
# Feature: local CSS edits first!
|
||||||
|
# ---------------------------------------------------------------
|
||||||
|
# The script will only download a local "booklet-stylesheet.css"
|
||||||
|
# if you don't have this file on your computer yet;
|
||||||
|
# In other words: it never overwrites your local edits.
|
||||||
|
# This allows for making custom modifications to the stylesheet
|
||||||
|
# for a specific booklet. :)
|
||||||
|
if [[ $(ls booklet-stylesheet.css) ]]; then
|
||||||
|
echo ">>> local booklet-sylesheet.css found"
|
||||||
|
else
|
||||||
|
echo ">>> downloading booklet-sylesheet.css"
|
||||||
|
curl --silent https://pzwiki.wdka.nl/mediadesign/User:Manetta/Booklet-stylesheet.css?action=raw > booklet-stylesheet.css
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl --silent https://pzwiki.wdka.nl/mediadesign/User:Manetta/Booklet-stylesheet.css?action=raw > booklet-stylesheet.css.tmp
|
||||||
|
|
||||||
|
DIFF=$(diff booklet-stylesheet.css.tmp booklet-stylesheet.css)
|
||||||
|
if [[ $DIFF ]]; then
|
||||||
|
echo ">>> checking booklet-sylesheet.css: local edits were made"
|
||||||
|
else
|
||||||
|
echo ">>> checking booklet-sylesheet.css: in sync with User:Manetta/Booklet-stylesheet.css"
|
||||||
|
fi
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
# 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
|
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 183 KiB |
Loading…
Reference in New Issue