From 1207b6737fcf850950eda1c4847a904ab1197d04 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sun, 12 Jul 2026 13:00:34 -0700 Subject: [PATCH] Initial commit --- .gitignore | 1 + LICENSE | 18 ++++++++++++++++++ README.md | 3 +++ convert.sh | 35 +++++++++++++++++++++++++++++++++++ ebook.md | 33 +++++++++++++++++++++++++++++++++ install.sh | 8 ++++++++ 6 files changed, 98 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md 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/LICENSE b/LICENSE new file mode 100644 index 0000000..f58d265 --- /dev/null +++ b/LICENSE @@ -0,0 +1,18 @@ +MIT License + +Copyright (c) 2025 me + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO +EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..5613ccc --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# ebook-template + +Template for creating future eBooks and booklets. \ No newline at end of file diff --git a/convert.sh b/convert.sh new file mode 100755 index 0000000..9c03eee --- /dev/null +++ b/convert.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# 2024-03-06 Hyperling +# PanDoc Usage: https://pandoc.org/MANUAL.html#general-writer-options + +DIR="$(dirname -- "${BASH_SOURCE[0]}")" +cd $DIR + +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 -n $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..046bc8c --- /dev/null +++ b/ebook.md @@ -0,0 +1,33 @@ +--- +# Font sizes can only be 10pt-12pt (https://pandoc.org/MANUAL.html#fonts) +fontsize: "12pt" +geometry: "margin=0.5in" + +#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 $?