View Single Post
Old 12-06-2013, 11:05 AM   #107
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,645
Karma: 5433388
Join Date: Nov 2009
Device: many
Hi,

I am not quite sure what you mean by "HTML TOC".

In Kindle Mobis the toc info is mapped into a set of toc Index records which are pointed to by the Mobi header offset fields as follows:

From the DumpMobiHeader output for the KF8 (Mobi 8) part of a joint mobi (similar things can be done with the older Mobi 7 part)

The field you want is:

Field: ncx_index Offset: 0x0f4 Width: 4 Value: 0x000c

Which says the NCX exists at an offset of 12 sections from the header section which for the Mobi 8 part in this case began at section 12, so the NCX section should be found at section 24. As you can see from the section map it exists there.

0012 - 000c: HEADER 8
0013 - 000d: Text Record 0
0014 - 000e: Text Record 1
0015 - 000f: 0000
0016 - 0010: Fragment Index 0
0017 - 0011: Fragment Index 1
0018 - 0012: Fragment Index CNX
0019 - 0013: Skeleton Index 0
0020 - 0014: Skeleton Index_Index 1
0021 - 0015: Guide Index 0
0022 - 0016: Guide Index 1
0023 - 0017: Guide Index CNX
0024 - 0018: NCX Index 0
0025 - 0019: NCX Index 1
0026 - 001a: NCX Index CNX

That said, as far as I know, a pure HTML TOC if included is simply inlined into the text records stored inside the palm database and there is no way to tell if it exists without dumping the text information (ie. basically unpacking it using KindleUnpack) and looking in the text info near the beginning or end to see if an html code is used to provide table of contents info).

Quote:
Originally Posted by quiris View Post
I'm sorry for a little off-topic but I have a one - important for me question. Do you know how to identify presence of HTML TOC in header dump only?

I am unable to find the info nowhere
Hope this answers your question.

KevinH
KevinH is online now   Reply With Quote