main
Bob Mottram 2022-10-23 14:24:04 +01:00
parent 7056672de6
commit b351f51735
2 changed files with 3 additions and 2 deletions

View File

@ -5,6 +5,7 @@ EPUB_AUTHORS='Bob Mottram'
EPUB_LANGUAGE='English' EPUB_LANGUAGE='English'
EPUB_TAGS='fediverse, activitypub, server, linux, python, smallweb' EPUB_TAGS='fediverse, activitypub, server, linux, python, smallweb'
EPUB_COMMENTS='ActivityPub server, designed for simplicity and accessibility. Includes calendar, news and sharing economy features to empower your federated community.' EPUB_COMMENTS='ActivityPub server, designed for simplicity and accessibility. Includes calendar, news and sharing economy features to empower your federated community.'
EPUB_PRODUCER='Fuzzy Books'
if [ ! -f /usr/bin/pandoc ]; then if [ ! -f /usr/bin/pandoc ]; then
echo 'pandoc command not found' echo 'pandoc command not found'
@ -13,12 +14,12 @@ fi
pandoc -t html -f markdown -o manual.html manual.md pandoc -t html -f markdown -o manual.html manual.md
git add manual.html git add manual.html
if [ -f /usr/bin/ebook-convert ]; then if [ -f /usr/bin/ebook-convert ]; then
ebook-convert manual.html manual.epub --cover manual-cover.png --authors "${EPUB_AUTHORS}" --language "${EPUB_LANGUAGE}" --tags "${EPUB_TAGS}" --comments "${EPUB_COMMENTS}" --title "${EPUB_TITLE}" ebook-convert manual.html manual.epub --cover manual-cover.png --authors "${EPUB_AUTHORS}" --language "${EPUB_LANGUAGE}" --tags "${EPUB_TAGS}" --comments "${EPUB_COMMENTS}" --title "${EPUB_TITLE}" --pretty-print --book-producer "${EPUB_PRODUCER}"
else else
echo 'ebook-convert command not found' echo 'ebook-convert command not found'
if [ -f /usr/bin/flatpak ]; then if [ -f /usr/bin/flatpak ]; then
if ! flatpak --command="sh" run com.calibre_ebook.calibre \ if ! flatpak --command="sh" run com.calibre_ebook.calibre \
-c "ebook-convert manual.html manual.epub --cover manual-cover.png --authors \"${EPUB_AUTHORS}\" --language \"${EPUB_LANGUAGE}\" --tags \"${EPUB_TAGS}\" --comments \"${EPUB_COMMENTS}\" --title \"${EPUB_TITLE}\""; then -c "ebook-convert manual.html manual.epub --cover manual-cover.png --authors \"${EPUB_AUTHORS}\" --language \"${EPUB_LANGUAGE}\" --tags \"${EPUB_TAGS}\" --comments \"${EPUB_COMMENTS}\" --title \"${EPUB_TITLE}\" --pretty-print --book-producer \"${EPUB_PRODUCER}\""; then
exit 2 exit 2
fi fi
fi fi

Binary file not shown.