Mobileread
Kindlestrip Python script and AppleScript wrapper
#11  pdurrant 02-22-2011, 03:29 AM
Quote twedigteam
it works fine in command line so the AppleScript issue is just a local one
How odd. You could try opening it with Script Editor and re-saving.
Reply 

#12  Piquan 02-22-2011, 05:54 AM
Thanks for your investigation, and the tool!

After I got v1.1, I added, at line 78 (just after calculating penoffset and lastoffset), the following:
if datain[self.penoffset:self.penoffset+4] != 'SRCS':
raise StripException("already stripped")

The intention here is to not delete the FCIS segment from an already-stripped file (or one that was generated with -donotaddsource). I'm enough of a doofus that I'm sure to mess up something by stripping it twice! (On the other hand, I've found one source that says the FLIS and FCIS segments aren't necessary for the Kindle, so at least I'd get a few second chances.)

Thanks again!
Reply 

#13  pdurrant 02-22-2011, 06:19 AM
Quote Piquan
Thanks for your investigation, and the tool!

After I got v1.1, I added, at line 78 (just after calculating penoffset and lastoffset), the following:
if datain[self.penoffset:self.penoffset+4] != 'SRCS':
raise StripException("already stripped")

The intention here is to not delete the FCIS segment from an already-stripped file (or one that was generated with -donotaddsource). I'm enough of a doofus that I'm sure to mess up something by stripping it twice! (On the other hand, I've found one source that says the FLIS and FCIS segments aren't necessary for the Kindle, so at least I'd get a few second chances.)

Thanks again!
What a good find. I hadn't realised that there were some constant bytes in that bit. I'll see if I can get an updated version done.
Reply 

#14  pdurrant 03-03-2011, 07:14 AM
Quote pdurrant
What a good find. I hadn't realised that there were some constant bytes in that bit. I'll see if I can get an updated version done.
Now updated to version 1.2, adding the sanity checking suggested by Piquan.
Reply 

#15  Xabache 09-19-2011, 02:41 AM
Could someone write a step by step tutorial for this using kindlestrip. I have tried to follow along but fell flat on my face despite being generally knowledgeable of computers. Step by step please, download this, drag that... Thanks.
Reply 

#16  pdurrant 09-19-2011, 03:20 AM
Quote Xabache
Could someone write a step by step tutorial for this using kindlestrip. I have tried to follow along but fell flat on my face despite being generally knowledgeable of computers. Step by step please, download this, drag that... Thanks.
Download and install 32-bit (x86) ActivePython from here.
Download the kindlestrip 1.2.zip file. Unzip to give kindlestrip.py
Copy the book you want stripped to the same directory as kindlestrip.
Open a command window
use the cd command to switch to the same directory as kindlestrip
type python kindlestrip.py [BOOKNAME]
where [BOOKNAME] is the name of the ebook to be stripped.
Reply 

#17  Peter Ahlstrom 10-05-2011, 03:13 PM
Paul, got a question. Is stripping actually necessary? I mean, when you upload an unstripped mobi to Amazon, does Amazon strip it themselves?

I had a mobi file made in kindlegen from an opf and html, and the unstripped version was 471 K. This was uploaded to Amazon and went on sale. Then I remembered I should strip it, so I did and got it down to 258 K. But then I looked at the version already on Amazon, and it said the filesize was 251 K.

So it seems to me that when the mobi was uploaded to Amazon in the first place, Amazon did something on the backend to already make the file as small as possible. Is there something I'm missing here?

(By the way, without mobiunpack I never would have been able to get the formatting looking very good. A million thanks for that.)
Reply 

#18  pdurrant 10-05-2011, 04:51 PM
That's a very good question. And it seems that the answer, if the kindle file is destined to be uploaded for sale through Amazon, is no. Thanks for testing!

However, if one wants to distribute the kindle/mobipocket file oneself, perhaps by making it available for free on a web page, it might be useful.

On the third hand, I suppose the same could be done, apparently, by uploading the Amazon and downloading the test that Amazon creates for you, without ever actually making it available for sale.
Reply 

#19  Peter Ahlstrom 10-06-2011, 01:00 PM
I'd be interested to see tests done, on how different a self-stripped file is from the one that Amazon generates. I can't test with my own file easily, since though I made it, the KDP account it's sold through is owned by someone else.
Reply 

#20  zdavatz 10-11-2011, 03:07 PM
Kindlestrip does its full job for me. My file is back to 18 MB from 54 MB. How dumb of Amazon not keeping the option -nodatasource.

Best
Zeno
Reply 

 « First  « Prev Next »  Last »  (2/14)
Today's Posts | Search this Thread | Login | Register