View Single Post
Old 01-31-2012, 04:48 PM   #36
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Hi DiapDealer,

I took a shot at using the srcs index and count info in a hopefully appropriate manner.

I called it kindlestrip_v133.py

I have only tested it in a limited fashion.

KevinH


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
Attached Files
File Type: zip kindlestrip_v133.py.zip (3.5 KB, 1045 views)
KevinH is offline   Reply With Quote