From 6f6a427e4e435e8fec782b2ef83925f3d18d5c9b Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Sat, 6 May 2023 17:55:17 -0700 Subject: [PATCH] Added mkdocspdf.sh script. --- scripts/mkdocspdf.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 scripts/mkdocspdf.sh diff --git a/scripts/mkdocspdf.sh b/scripts/mkdocspdf.sh new file mode 100755 index 0000000..2bd1773 --- /dev/null +++ b/scripts/mkdocspdf.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +FORMAT=pdf +SUFFIX=pdf +SOURCES="*.scad.md Tutorial-*.md Topics.md AlphaIndex.md" +PANDOC="/usr/local/Cellar/pandoc/3.1/bin/pandoc" +TITLE="Documentation for the Belfry OpenSCAD Library v2" +AUTHOR="Garth Minette" + +if [[ ! -d BOSL2.wiki ]] ; then + echo "Must be in the BOSL2 directory." + exit 255 +fi + +cd BOSL2.wiki + +${PANDOC} -f gfm -t ${FORMAT} -o ../documentation.${SUFFIX} \ + -s --embed-resources --mathjax --file-scope --pdf-engine=xelatex \ + --toc --columns=100 --epub-cover-image=../images/BOSL2logo.png \ + --variable mainfont=Arial --variable sansfont=Arial \ + --metadata title="${TITLE}" \ + --metadata author="${AUTHOR}" \ + --metadata date="$(date -j "+%B %e, %Y")" \ + --metadata geometry=left=3cm,right=3cm,top=2cm,bottom=2cm \ + ${SOURCES} + +cd .. + +