Files
ebook-freedom-flyer/convert.sh
2025-09-28 04:30:26 -07:00

36 lines
585 B
Bash
Executable File

#!/bin/bash
# 2024-03-06 Hyperling
# PanDoc Usage: https://pandoc.org/MANUAL.html#general-writer-options
date
md="ebook-veganarchist-sovereignty.md"
ebook="VoluntarySovereignty.pdf"
if [[ -e $ebook ]]; then
echo -n "Old: "
du -h $ebook
rm -v $ebook
fi
cp $md /tmp/
sed -i "s/{REVISION_DATE}/`date +'%Y-%m-%d'`/g" /tmp/$md
pandoc /tmp/$md \
-s \
-o $ebook
status=$?
# Use LaTeX booklet package to make a print, fold, and staple version!
pdfbook2 $ebook
#pdfbook2 --signature=4 $ebook
echo "Completed with status '$status'."
echo -n "New: "
du -h $ebook
date
exit $status