storing these scripts in a git

master
mb 11 months ago
commit 15b331b896

@ -0,0 +1,15 @@
# First convert the notebook into a HTML page
nb_path=$1
empty_string=""
nb_path_without_ext=$(echo "$nb_path" | sed "s/.ipynb/$empty_string/")
jupyter nbconvert --to html $nb_path
# Then convert the HTML into a PDF with Weasyprint
weasyprint -s notebook-to-pdf.css $nb_path_without_ext.html $nb_path_without_ext.pdf
# Then convert the PDF into a booklet PDF
pdfbook2 $nb_path_without_ext.pdf --no-crop --paper a4paper

@ -0,0 +1,19 @@
@page{
size: 148mm 210mm;
margin: 10mm !important;
font-size: 10pt;
}
body{
margin: 0 !important;
}
.cm-s-jupyter pre{
white-space: pre-wrap;
padding: 0 !important;
margin: 0 !important;
font-weight: bold;
}
img{
max-width: 100%;
height: auto;
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save