bfabiszewski/libmobi

AZW3 file generates table of contents that does not work

gregko opened this issue · 1 comments

I have an AZW3 file that I cannot post publicly, but could send you by email for testing. When converted to EPUB, it generates non-functional Table of Contents (TOC) - the chapter names are correct, but links do not work. The TOC entries are like:

  <navPoint id="toc-2" playOrder="2">
   <navLabel>
    <text>CAP&amp;Iacute;TULO II: Otra mudanza ca&amp;oacute;tica</text>
   </navLabel>
   <content src="part00000.html#"/>
  </navPoint>

Note that '' is missing a tag after # character. The same happens with internal links in ebook text to the chapter titles. The same file converts fine to EPUB e.g. with Calibre.

BTW, tried to email you privately about this first, but the email does not go through and sits in the retry queue. Your own mail server at your .net domain says that your email address is graylisted...

Greg

I found a solution and corrected my copy of the code, basically all the tags had "name" and "aid" attributes, "id" was missing in this AZW3 file embedded HTML code. I decided to use "name" in that case and the internal links started to work, if interested see:

gregko/EbookConverter@feef4c9

Greg