Last October I posted about an Automator workflow for KindleGen. (Warning: Mac geek speak forthcoming.) I was pretty proud of it, but it had a bug, which is that it couldn’t handle spaces in the file’s path. For example, if your epub file is located in a folder named “Sparkly Vampire Novel,” which we both know it likely is, you’ll get an error message.
Now a reader named Ivo has provided a solution to the spaces problem. He’s using it with the “Run Shell Script” action so that KindleGen runs invisibly and you never see Terminal. I still prefer the Terminal way, because then I can watch for errors while KindleGen runs, but either approach will work.
I want to keep the info in one place, so I’ve updated the original post with the revised script. Please check it out if you use a Mac and KindleGen. With Ivo’s fix, it really does make mobi creation as simple as right-clicking on an epub or opf file, no matter where it’s located on your Mac.