View Single Post
Old 04-28-2019, 11:42 AM   #2
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: 8,842
Karma: 6120478
Join Date: Nov 2009
Device: many
Not on generation of mobi files, but on unpacking Mobi 7 and Mobi 8 files. If you want to see how the ncx equivalent is unpacked from a Mobi index database record, see github for KindleUnpack here:

https://github.com/kevinhendricks/KindleUnpack

The binary index format is quite a pain but you can see how to unpack one once the proper record has been identified. Although similar, the ncx info in Mobi 6 and 7, differs from the more epub like Mobi 8 ncx info.

Look in the lib directory for kindleunpack.py, mobi_index.py, and mobi_ncx.py.

The easiest way to understand the binary format is generate a mobi 8 using Kindlegen from a known epub with an elaborate ncx and upack it with added debug statements added to the mobi_index.py and mobi_ncx.py code.
KevinH is online now   Reply With Quote