tab2opf icon indicating copy to clipboard operation
tab2opf copied to clipboard

Dictionary lookup fails on Paperwhite Kindle 5.12.2

Open clach04 opened this issue 2 years ago • 1 comments

Dictionary is recognized but word lookup finds no entries.

Test text file:

austin	powers
believe	stuff, made up stuff
cupboard	where you store stuff
death	When you are dead.
exit	when you leave
primary	the one thing

Output from kindlegen build on dictionary that lookup does not work

C:\code\py\tab2opf>kindlegen.exe test.opf

*************************************************************
Amazon kindlegen(Windows) V2.9 build 1029-0897292
A command line e-book compiler
Copyright Amazon.com and its Affiliates 2014
*************************************************************

Info(prcgen):I1047: Added metadata dc:Title        "test"
Info(prcgen):I1002: Parsing files  0000002
Warning(parser8):W26001: Index not supported for enhanced mobi.
Info(parser8):I12001: Enhanced mobi generation suppressed.
Info(prcgen):I1037: Mobi file built with WARNINGS!

I stumbled across https://jakemccrary.com/blog/2020/11/11/creating-a-custom-kindle-dictionary/ and following that approach does work.

Output from kindlegen build on dictionary that lookup does work

C:\code\py\tab2opf\dict_notes>..\kindlegen.exe dict.opf

*************************************************************
 Amazon kindlegen(Windows) V2.9 build 1029-0897292
 A command line e-book compiler
 Copyright Amazon.com and its Affiliates 2014
*************************************************************

Info(prcgen):I1047: Added metadata dc:Title        "A dictionary for testing"
Info(prcgen):I1047: Added metadata dc:Creator      "By Me"
Info(prcgen):I1002: Parsing files  0000004
Warning(parser8):W26001: Index not supported for enhanced mobi.
Info(parser8):I12001: Enhanced mobi generation suppressed.
Info(prcgen):I1015: Building PRC file
Info(prcgen):I1006: Resolving hyperlinks
Warning(prcgen):W14016: Cover not specified
Info(pagemap):I8000: No Page map found in the book
Info(prcgen):I1045: Computing UNICODE ranges used in the book
Info(prcgen):I1046: Found UNICODE range: Basic Latin [20..7E]
Info(prcgen):I1017: Building PRC file, record count:   0000001
Info(prcgen):I1039: Final stats - text compressed to (in % of original size):  53.42%
Info(prcgen):I1040: The document identifier is: "A_dictionary_for_testing"
Info(prcgen):I1041: The file format version is V7
Info(prcgen):I1031: Saving PRC file
Info(prcgen):I1033: PRC built with WARNINGS!
Info(prcgen):I1037: Mobi file built with WARNINGS!

The content is different but I'm not yet clear what the significant differences are. Looking just at the word entries:

  <idx:entry name="word" scriptable="yes">
    <h2>
      <idx:orth value="austin">austin</idx:orth>
    </h2>
powers
  </idx:entry>

versus working entry:

    <idx:entry name="default" scriptable="yes" spell="yes">
      <h5><dt><idx:orth>austin</idx:orth></dt></h5>
      <dd>powers</dd>
    </idx:entry>
    <hr/>

clach04 avatar Jan 09 '22 01:01 clach04

DefaultLookupIndex is missing from tab2opf which based on linked article maybe significant (language also looks different en versus en-us).

clach04 avatar Jan 09 '22 01:01 clach04