Quote:
Originally Posted by Mr.Walkman
okay I got it working. for everyone who also want's to give this a try here is the code:
Code:
while read LINE
do
/usr/bin/ebook-convert "$LINE" "${LINE/.*/}.mobi"
/usr/bin/calibre-smtp from@mail.com to@mail.com "sender_name" -r senders_smtp_server -u username -a "${LINE/.*/}.mobi" -p password -e TLS --port 587
rm "${LINE/.epub/}.mobi"
done
This does: convert any file to mobi, sends this file to the kindle and then delete the mobi file again.
|
Sorry for replying in an old thread, but is there a way to alter this comment so that it outputs what it is actually doing? I had been using another command thus far, which is
Code:
find . -name '*.epub' -type f -exec bash -c 'ebook-convert "$0" "${0%.epub}.mobi" --prefer-author-sort --output-profile=kindle --linearize-tables --smarten-punctuation --enable-heuristics' {} \;
which works very nicely and outputs steps as well as progress, but I don't know how to automatize the email sending portion.