diff --git a/convert.sh b/convert.sh new file mode 100755 index 0000000..6058577 --- /dev/null +++ b/convert.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# 2024-03-06 Hyperling +# PanDoc Usage: https://pandoc.org/MANUAL.html#general-writer-options + +date + +ebook="ebook.pdf" + +if [[ -e $ebook ]]; then + echo -n "Old: " + du -h $ebook + rm -v $ebook +fi + +cp ebook.md /tmp/ +sed -i "s/{REVISION_DATE}/`date +'%Y-%m-%d'`/g" /tmp/ebook.md + +pandoc /tmp/ebook.md \ + -s \ + -o $ebook +status=$? + +pdfbook2 $ebook + +echo "Completed with status '$status'." + +echo -n "New: " +du -h $ebook + +date + +exit $status diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..1e527e2 --- /dev/null +++ b/install.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# 2024-03-06 Hyperling + +sudo apt install pandoc \ + texlive-latex-base texlive-fonts-recommended \ + texlive-extra-utils texlive-latex-extra + +exit $?