View Single Post
Old 06-21-2020, 05:50 AM   #16
annoporci
Enthusiast
annoporci began at the beginning.
 
Posts: 36
Karma: 10
Join Date: Oct 2012
Location: Los Angeles
Device: Kindle Paperwhite 2019, Firmware 5.12.4
Hi jhowell!

So it's taken me a while, but I have finally edited my Catalan dictionary. I'm still in the middle of testing, and there are a few things I need to clean up and/or automate, but I was able to dump my `content.opf` file into KindlePreviewer and a dictionary was produced. It looks alright and I'd like to test to see if it does act like a look-up dictionary in my Kindle Paperwhite. But I have a few questions/problems first.

I used KindlePreviewer because from what I read it was going to be the quickest way: just open the `content.opf` and wait 30 minutes. But here's my first issue: KindlePreviewer will not let me "export" the ebook it produced. Any workaround? I'm on MacOS, is the ebook somewhere in a hidden directory? This is what KindlePreviewer says about exporting:
Quote:
Note:If you are unable to export or the export option is disabled, it might be due to the following reasons: f you used Kindle Previewer to generate the KPF file, you can use it to open your book without reconverting it the next time you want to preview, and you can send your original source file (e.g., EPUB, DOCX) or the KPF file to Amazon for publishing. If you’reusing ePub or other HTML-based formats, make surethat you have defined the right language, and remove any unnecessary language definitions. Some third-party tools add additional language definitions that are not necessary, which might be preventing Kindle Previewer from exporting your book.
Now KindlePreviewer lists the language as English in `View > Language`, but gives "ca" under `View > Book Information`. Could this be the problem? My `content.opf` file has `<dc:language>ca</dc:language>, while every dictionary entry is tagged with `<idx:entry name="Catalan" scriptable="yes" spell="yes">`

Note that every Catalan ebook I throw at KindlePreviewer lists the language as English, so it seems that KindlePreviewer has limited support for languages. Perhaps I need to use KindleGen instead?

I'm curious to see if I can get my Kindle to pop-up some definition. If only I could find the book that KindlePreviewer made and is hiding from me!

On another note, I'm pretty sure my effort will need to be refined, as I haven't done anything about `<idx:infl>` for instance (each entry is empty right now). My code is on Github, but I'm a little embarrased to show it right now. I have mostly used Python/BeautifulSoup. I have some undesired white spaces caused by my editing and the `xhtml` code is not indented properly, but I checked an online tool that did not detect problems in the `xml` structure.
annoporci is offline   Reply With Quote