Skip to content

Commit

Permalink
Only use ebook-convert for mobi
Browse files Browse the repository at this point in the history
  • Loading branch information
captn3m0 committed Apr 30, 2020
1 parent 265d11a commit 04f0a1d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -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
Expand Down

0 comments on commit 04f0a1d

Please sign in to comment.