Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 02-22-2014, 09:40 PM   #1
Mr.Walkman
Junior Member
Mr.Walkman began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2014
Device: Kindle
Question Epub -> Mobi -> Mail with commandline

Hi there,

I'm trying to use the Automator in Mac to do a oneclick solution for converting a epub-file to mobi and then send this file by mail to my kindle.

I got the conversion working with this bash-skript:

Code:
while read LINE
do
	/usr/bin/ebook-convert "$LINE" "$LINE.mobi" --output-profile kindle_pw
done
I tried to include calibre-smtp but the script always failes. How can i hand over the converted file to calibre-smtp in the same command?

calibre-smpt -a "$LINE.mobi" -u... -p... and so on isn't working.

Thanks for your help!
Mr.Walkman is offline   Reply With Quote
Old 02-23-2014, 04:48 AM   #2
Mr.Walkman
Junior Member
Mr.Walkman began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2014
Device: Kindle
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.

replace:

from@mail.com with your personal email
to@mail.com with your kindle email
sender_name with the name you want the mail send to be from (also can leave it empty)
senders_smtp_server with your outgoing smtp server (just google it)
username with your email username
password with your password
TLS either TLS or SSL depends on your providers smpt (just google it)
587 with your providers smtp port (just google it)

just start automator, do a new application add a shell-command field, paste the code, alter it and save the application. drag and drop your file onto the application and the rest will just work
Mr.Walkman is offline   Reply With Quote
 
Enthusiast
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Epub capable ebook reader for win7 with commandline options (CLI) Togg Windows Devices 1 04-24-2013 04:07 PM
Conversion from mobi (to mobi, or epub) breaks internal links bounder Conversion 1 10-09-2012 11:56 AM
18MB EPUB converts to 40MB Mobi! What can I do to reduce Mobi file size? perdman Conversion 7 08-27-2011 02:40 PM
Commandline only build plord Calibre 11 11-27-2010 06:56 PM
Automatic Web conversion to mobi/epub and send mail by Calibre bthoven Amazon Kindle 0 11-14-2010 09:56 PM


All times are GMT -4. The time now is 04:01 AM.


MobileRead.com is a privately owned, operated and funded community.