|05-20-2011, 01:14 PM||#1|
Join Date: May 2011
Device: Kindle DX
Python script: batch create mobi's from epubs (if they don't exist)
I've created a little script for my personal use that creates .mobi files from any .epub files that don't already have a .mobi counterpart using ebook-convert.
This is my very, very first script in Python. (Usually write things like this in bash.) So it has a good deal of limitations: it only works on one directory at a time, it assumes that the name of the file between epub and mobi versions is constant, and I'm sure it has a thousand other limitations. It handles white space in the filenames fine. I've only tested it in linux environments...so I doubt it is windows friendly.
You can find the script here:http://pastebin.com/0HpA7dy0 . You need to feed it one argument: the directory it should search for epubs/mobis. For example:
python mobimaker.sh /home/jmeb/ebooks
Thanks for the wonderful software to base this on, and the community round here (been lurking around for a while.)
Last edited by jmeb; 05-20-2011 at 03:25 PM.
|convert, epub, mobi, python|
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Any experience in formating epubs or MOBI's||The Terminator||Lounge||1||04-04-2011 08:45 AM|
|how to use python script with windows xp||tuufbiz1||Other formats||12||01-08-2011 08:22 AM|
|How do I get a shortcut for a Python script onto the taskbar in W7?||Sydney's Mom||Workshop||6||03-28-2010 08:11 PM|
|Nedd a little help with a python script||gandor62||Calibre||1||08-07-2008 09:59 PM|
|Python script to create collections||gwynevans||Sony Reader Dev Corner||2||03-13-2008 12:29 PM|