Quote:
Originally Posted by KevinH
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 ...