main
Bob Mottram 2022-10-23 10:10:14 +01:00
parent 5f3dac0c6c
commit 0fd0645391
2 changed files with 9 additions and 2 deletions

View File

@ -1,4 +1,11 @@
#!/bin/bash #!/bin/bash
EPUB_TITLE='Epicyon User Manual'
EPUB_AUTHORS='Bob Mottram'
EPUB_LANGUAGE='English'
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.'
if [ ! -f /usr/bin/pandoc ]; then if [ ! -f /usr/bin/pandoc ]; then
echo 'pandoc command not found' echo 'pandoc command not found'
exit 1 exit 1
@ -6,12 +13,12 @@ fi
pandoc -f html -t markdown -o manual.md manual.html pandoc -f html -t markdown -o manual.md manual.html
git add manual.md git add manual.md
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 "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" 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}"
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 \"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 -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
exit 2 exit 2
fi fi
fi fi

Binary file not shown.