2024-03-06 14:17:03 -07:00
|
|
|
#!/bin/bash
|
2024-03-06 17:33:06 -07:00
|
|
|
# 2024-03-06 Hyperling
|
2024-03-06 14:17:03 -07:00
|
|
|
# PanDoc Usage: https://pandoc.org/MANUAL.html#general-writer-options
|
|
|
|
|
|
|
|
date
|
|
|
|
|
2024-03-06 17:32:04 -07:00
|
|
|
ebook="HyperlingsHealthProtocol.pdf"
|
2024-03-06 16:35:01 -07:00
|
|
|
|
|
|
|
if [[ -e $ebook ]]; then
|
2024-03-06 17:59:49 -07:00
|
|
|
echo -n "Old: "
|
2024-03-06 17:32:04 -07:00
|
|
|
du -h $ebook
|
2024-03-06 16:35:01 -07:00
|
|
|
rm -v $ebook
|
2024-03-06 16:04:43 -07:00
|
|
|
fi
|
2024-03-06 14:17:03 -07:00
|
|
|
|
|
|
|
pandoc ebook.md \
|
2024-03-06 16:04:43 -07:00
|
|
|
-s -N --toc --toc-depth=3 \
|
2024-03-06 16:35:01 -07:00
|
|
|
-o $ebook
|
2024-03-06 14:17:03 -07:00
|
|
|
status=$?
|
|
|
|
|
|
|
|
echo "Completed with status '$status'."
|
|
|
|
|
2024-03-06 17:59:49 -07:00
|
|
|
echo -n "New: "
|
2024-03-06 16:35:01 -07:00
|
|
|
du -h $ebook
|
|
|
|
|
2024-03-06 14:17:03 -07:00
|
|
|
date
|
|
|
|
|
|
|
|
exit $status
|