epub creation via flatpak

main
Bob Mottram 2022-10-23 10:03:41 +01:00
parent 187751b4d9
commit 5f3dac0c6c
3 changed files with 690 additions and 159 deletions

21
manual/make_epub 100755
View File

@ -0,0 +1,21 @@
#!/bin/bash
if [ ! -f /usr/bin/pandoc ]; then
echo 'pandoc command not found'
exit 1
fi
pandoc -f html -t markdown -o manual.md manual.html
git add manual.md
if [ -f /usr/bin/ebook-convert ]; then
ebook-convert manual.html manual.epub --cover manual-cover.png --authors "Bob Mottram" --language "English" --tags "fediverse, activitypub, server, linux, python, smallweb" --comments "ActivityPub server, designed for simplicity and accessibility. Includes calendar, news and sharing economy features to empower your federated community." --title "Epicyon User Manual"
else
echo 'ebook-convert command not found'
if [ -f /usr/bin/flatpak ]; then
if ! flatpak --command="sh" run com.calibre_ebook.calibre \
-c "ebook-convert manual.html manual.epub --cover manual-cover.png --authors \"Bob Mottram\" --language \"English\" --tags \"fediverse, activitypub, server, linux, python, smallweb\" --comments \"ActivityPub server, designed for simplicity and accessibility. Includes calendar, news and sharing economy features to empower your federated community.\" --title \"Epicyon User Manual\""; then
exit 2
fi
fi
fi
if [ -f manual.epub ]; then
git add manual.epub
fi

BIN
manual/manual.epub 100644

Binary file not shown.

File diff suppressed because it is too large Load Diff