Only use ebook-convert for mobi

This commit is contained in:
Nemo 2020-05-01 03:35:23 +05:30
parent 265d11a3b5
commit 04f0a1d6f4
1 changed files with 3 additions and 4 deletions

View File

@ -74,6 +74,7 @@ pandoc --from=html --to=epub \
--metadata title="$BOOK_NAME" \
complete.html
# generate PDF from HTML
pandoc --from=html --to=pdf \
--output=../../../../../${BOOK_FILE}.pdf \
--metadata title="$BOOK_NAME" \
@ -97,10 +98,8 @@ pandoc --from=html --to=pdf \
popd
# Generate other format from epub.
for EXTENSION in mobi pdf; do
ebook-convert ${BOOK_FILE}.epub ${BOOK_FILE}.${EXTENSION}
done
# Generate mobi using calibre
ebook-convert ${BOOK_FILE}.epub ${BOOK_FILE}.mobi
# If it works inside docker.
if [ "$MODE" == "docker" ]; then