View Single Post
Old 11-06-2018, 11:11 AM   #1
sup
Zealot
sup began at the beginning.
 
Posts: 103
Karma: 10
Join Date: Sep 2013
Device: Kindle Paperwhite (2012)
Make mobis downloaded via a recipe smaller

My e-mail provider refuses to send my downloaded news to my Kindle because the files are to large. I came up with this code (do not run if you have a tmp directory in your working directory):

Code:
ebook-convert big.mobi tmp.epub
unzip -d tmp tmp.epub   
cd tmp
find . -type f  \
-iregex  '^.*[.]\(jpg\|jpeg\|png\|gif\)$' \
-exec mogrify -quality 85 -resize '500x500>' {} \;
zip -Duro ../tmp1.epub .
cd ..
rm -rf tmp
ebook-convert tmp.epub small.mobi
Isn't there a simpler way to tell calibre to convert the images to smaller sizes?
sup is offline   Reply With Quote