Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dictionary lookup fails on Paperwhite Kindle 5.12.2 #6

Open
clach04 opened this issue Jan 9, 2022 · 1 comment
Open

Dictionary lookup fails on Paperwhite Kindle 5.12.2 #6

clach04 opened this issue Jan 9, 2022 · 1 comment

Comments

@clach04
Copy link

clach04 commented Jan 9, 2022

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
Copy link
Author

clach04 commented Jan 9, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant