View Single Post
Old 08-20-2012, 04:14 AM   #41
dilo_sec
Member
dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.
 
Posts: 21
Karma: 244219
Join Date: Jul 2011
Device: K3
mobi with srcs_count = 2

Quote:
Originally Posted by KevinH View Post
Hi DiapDealer,

Based on looking at Nick's mobi_split.py code, it seems that the Mobi Header actually has a pointer and count to the SRCS record:

srcs_index = 224 (or 0xe0)
srcs_count = 228 (or 0xe4)

So I think we need a new version of kindlestrip.py that once it removes the SRCS section, it modifies the mobi (section 0) header to set 0xe0 to 0xffffffff and 0xe4 to 0.

We probably need to do that (or at least check) inside both the mobi7 header and the kf8 mobi header. We should also probably back-port this change to the original kindlestrip.py as well.

KevinH
When using kindlegen to convert an epub to mobi, I've come across a mobi file where srcs_count = 2.

kindlestrip.py displays:
KindleStrip v1.34. Written 2010-2012 by Paul Durrant and Kevin Hendricks.
Found SRCS section number 240, and count 2
Error: SRCS section num does not point to SRCS.

The 1st section (240) starts "PAGE" - this appears to be a "pageMap" section generated from the "page-map.xml" file in the epub - the section contains these strings:
"fileRevisionId" : "1"
"description" : "PageMap from source by kindlegen"

The 2nd section (241) starts "SRCS".

I think the "pageMap" should be retained, "SRCS" section stripped and srcs_count reduced by 1 - I'll attempt to code a fix and test it ...

Last edited by dilo_sec; 08-20-2012 at 09:38 AM. Reason: update with kindlestrip.py actual output
dilo_sec is offline   Reply With Quote