View Single Post
Old 10-15-2012, 01:34 PM   #49
SusanM
Bemused by possibilities
SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.SusanM ought to be getting tired of karma fortunes by now.
 
SusanM's Avatar
 
Posts: 58
Karma: 480244
Join Date: Jul 2012
Device: iPad3, Kobo
Great Script

Quote:
Originally Posted by pdurrant View Post
Kindlegen 1.1 and later now always adds the source files used in compiling the kindle ebook as the penultimate record in the kindle ebook.

So I wrote a python script that strips out the sources record from Kindle format ebooks. And for those on Macs I wrote a nice Applescript wrapper and also put the python script in the AppleScript bundle to make things easy.

If you're going to upload to the Amazon store, this script is probably unnecessary, as Amazon will strip the sources before delivery anyway.

But if you're going to upload the ebook somewhere else, (e.g. the MobileRead Library), you might well want to make the file as small as possible.

KevinH has enhanced the original python script to handle newer Kindle format ebooks correctly.

Here they are. A python script, and an AppleScript wrapper around it. If you're on a Mac you only need the Applescript, as it includes the Python script in it. The Applescript is a simple drag&drop operation drag your KindleGen generated file onto it, and it creates one named [oldname]_stripped.mobi.

As always, please comment with any bug reports or problems.
Great script and thanks!
SusanM is offline   Reply With Quote