View Single Post
Old 06-09-2014, 08:28 AM   #25
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,705
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by kovidgoyal View Post
Just FYI, you can write python scripts to process epub and azw3 files using the same infrastructure the calibre editor uses, like this:


And you run this like this

calibre-debug myscript.py file.epub

Look at polish/container.py for the various API methods of the container object as well as the other files in the polish directory to see how you can achieve various things the editor does.
Very cool! Thanks for the tip (and the functionality).

Last edited by DiapDealer; 06-09-2014 at 08:42 AM.
DiapDealer is offline   Reply With Quote