From 27d9650cb10870ce52bf7d916f328c530193a812 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Tue, 30 Sep 2025 11:40:03 -0700 Subject: [PATCH] Add template documents. --- .gitignore | 1 + convert.sh | 32 ++++++++++++++++++++++++++++++++ ebook.md | 33 +++++++++++++++++++++++++++++++++ install.sh | 8 ++++++++ 4 files changed, 74 insertions(+) create mode 100644 .gitignore create mode 100755 convert.sh create mode 100755 ebook.md create mode 100755 install.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a136337 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.pdf 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/ebook.md b/ebook.md new file mode 100755 index 0000000..37d46a9 --- /dev/null +++ b/ebook.md @@ -0,0 +1,33 @@ +--- +# Font sizes can only be 10pt-12pt (https://pandoc.org/MANUAL.html#fonts) +fontsize: "11pt" +geometry: "margin=1in" + +#title-meta: "Template Project" +date-meta: "\\date{\\today}" +author-meta: 'Chad Michael Greenwood' +subject: Template eBook by Chad Michael Greenwood + +title: "Template Project" +subtitle: "Example which will be used for future eBook repositories." +author: "by `Chad Michael Greenwood`" +date: "Last Revised {REVISION_DATE}" + +keywords: + - ebook + - hyperling + - hypervegan + - chad michael greenwood +--- + +# First Section + +This is an example. + +## Subsection + +More text to show a sublevel. + +# Second Section + +More example text. 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 $?