Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 08-23-2024, 03:27 PM   #1
qys
Junior Member
qys began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2024
Device: Kindle Paperwhite 3 (DP75SDI)
Question Using dictionaries purchased from Kindle Store

I wonder if it's possible to use a dictionary purchased from the Amazon Kindle Store (for example, this one) in KOReader. It looks like the dictionary downloaded to my Kindle is in some "azw" format, not the "stardict" format KOReader supports. However, the stock reader in Kindle supports the "azw" dictionaries in "Settings > Language & Dictionaries > Dictionaries".

How do I convert "azw" to "stardict"? What are these "azw" files anyway, a generic format for e-books, or a specialized format for dictionaries?
qys is offline   Reply With Quote
Old 08-23-2024, 07:35 PM   #2
Ebookus
Digital Grenadier
Ebookus ought to be getting tired of karma fortunes by now.Ebookus ought to be getting tired of karma fortunes by now.Ebookus ought to be getting tired of karma fortunes by now.Ebookus ought to be getting tired of karma fortunes by now.Ebookus ought to be getting tired of karma fortunes by now.Ebookus ought to be getting tired of karma fortunes by now.Ebookus ought to be getting tired of karma fortunes by now.Ebookus ought to be getting tired of karma fortunes by now.Ebookus ought to be getting tired of karma fortunes by now.Ebookus ought to be getting tired of karma fortunes by now.Ebookus ought to be getting tired of karma fortunes by now.
 
Ebookus's Avatar
 
Posts: 90
Karma: 750000
Join Date: Jan 2024
Device: Kindle
you can try pyglossary
Ebookus is offline   Reply With Quote
Advert
Old 08-30-2024, 11:42 AM   #3
DJUNGELSKOG
Enthusiast
DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.
 
DJUNGELSKOG's Avatar
 
Posts: 48
Karma: 438804
Join Date: Nov 2023
Location: Belgium / Vlaanderen
Device: Kobo Libra 2
I've actually managed to pull it off and I have written a manual for my future self. However I won't be at home until next week. If you remind me about it next weel then I'll post the instructions here.

I've also managed to get Rakuten Serif font to work in Koreader lol.
DJUNGELSKOG is offline   Reply With Quote
Old 08-30-2024, 01:55 PM   #4
qys
Junior Member
qys began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2024
Device: Kindle Paperwhite 3 (DP75SDI)
Thanks Ebookus for suggesting pyglossary; that looks promising!

DJUNGELSKOG, please post the instructions once you have time! I'm sure many people like me will benefit from this.
qys is offline   Reply With Quote
Old 09-05-2024, 07:26 AM   #5
DJUNGELSKOG
Enthusiast
DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.
 
DJUNGELSKOG's Avatar
 
Posts: 48
Karma: 438804
Join Date: Nov 2023
Location: Belgium / Vlaanderen
Device: Kobo Libra 2
Ok here we go.

I was looking to achieve the same thing and eventually I've found these instructions: https://gist.github.com/Fef0/913caa8...0ed1eb9d0f11e7 . They didn't work for me initially so I have amended them.

Quote:
Step 1:
Download the KindleUnpack program from here: https://github.com/kevinhendricks/KindleUnpack
Start GUI with python ./KindleUnpack.pyw
Select .mobi file as input and choose your output directory
(optional) I don't know if it is necessary, but select ePub Output type: Auto-Detect
Click the Start button and wait
A file called mobi7/book.html is now present in the output directory

Step 2
Download the mobi2stardict.py script from here: https://github.com/anezih/mobi2stardict
Place the script in the same folder as the book.html file
Run it with
python mobi2stardict.py --fix-links --dict-name "vandale-nl-nl" --textual --html-file "book.html"
A file called book_stardict_textual.xml will appear

Step 3
Download PyGlossary https://github.com/ilius/pyglossary
Select input file book_stardict_textual.xml
Select input format stardict_textual_file (.xml)
Specify the ouput file /home/schatje/Downloads/dictionaries_to_convert/name_of_ur_file
Specify the output format StarDict.ifo

Step 4 (optional, KOReader on Kindle)

(optional) If you want to change the dictionary name (it is book by default) then open book.ifo with a text editor and update "bookname" entry to bookname=wordnet3
Copy ALL the files (book.dict, book.idx, book.ifo, book.syn) to koreader/data/dict/
Restart KOReader
From KOReader select the magnifying glass > Dictionary settings > Manage dictionaries > and select wordnet3
I'm very happy with the result! Maybe there is an easier way to achieve the conversion but I didn't look for it.

Last edited by DJUNGELSKOG; 09-05-2024 at 07:28 AM.
DJUNGELSKOG is offline   Reply With Quote
Advert
Old 09-06-2024, 10:32 AM   #6
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,675
Karma: 730583
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Based purely on that message step 2 (or 3) sounds a bit odd given that step 2 is running something called "to stardict"?
Frenzie is offline   Reply With Quote
Old 09-07-2024, 01:50 PM   #7
DJUNGELSKOG
Enthusiast
DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.DJUNGELSKOG ought to be getting tired of karma fortunes by now.
 
DJUNGELSKOG's Avatar
 
Posts: 48
Karma: 438804
Join Date: Nov 2023
Location: Belgium / Vlaanderen
Device: Kobo Libra 2
I'm sure that it's possible to achieve in a more effective way, but this is what has worked for me I didn't check whether the .xml file would already work with Koreader and just followed all the steps from that gist.

Last edited by DJUNGELSKOG; 09-07-2024 at 02:11 PM.
DJUNGELSKOG is offline   Reply With Quote
Old 09-09-2024, 10:55 AM   #8
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,675
Karma: 730583
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
You're probably right that the intermediary is required if PyGlossary can't do mobi.
Frenzie is offline   Reply With Quote
Old 09-09-2024, 11:27 AM   #9
nezih
Enthusiast
nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.
 
nezih's Avatar
 
Posts: 40
Karma: 14828
Join Date: Feb 2023
Device: Kobo Aura SE
Quote:
Originally Posted by DJUNGELSKOG View Post
I'm sure that it's possible to achieve in a more effective way, but this is what has worked for me I didn't check whether the .xml file would already work with Koreader and just followed all the steps from that gist.
I'm the author of https://github.com/anezih/mobi2stardict. I plan to add direct StarDict output to the script via PyGlossary. However, starting from next week I won't be available for approximately 1 month.

Apart from that, I have started to write a library in C# that can directly read MOBI dictionary files which will again produce binary StarDict files without any intermediary format.

When any of the above is completed I can update this thread.
nezih is offline   Reply With Quote
Old 10-18-2024, 03:19 PM   #10
Thorns
Member
Thorns began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Oct 2024
Device: Kobo
Quote:
Originally Posted by DJUNGELSKOG View Post
Ok here we go.

I was looking to achieve the same thing and eventually I've found these instructions: https://gist.github.com/Fef0/913caa8...0ed1eb9d0f11e7 . They didn't work for me initially so I have amended them.



I'm very happy with the result! Maybe there is an easier way to achieve the conversion but I didn't look for it.
Hey I followed your steps but when I get to the second stage I keep getting the message that it's "Not a dictionary file" - when I open the HTML on the web browser it definitely looks like a dictionary! and it looks to have unpacked it properly. No idea what to do, any ideas?
Thorns is offline   Reply With Quote
Old 10-18-2024, 03:20 PM   #11
Thorns
Member
Thorns began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Oct 2024
Device: Kobo
Quote:
Originally Posted by nezih View Post
I'm the author of https://github.com/anezih/mobi2stardict. I plan to add direct StarDict output to the script via PyGlossary. However, starting from next week I won't be available for approximately 1 month.

Apart from that, I have started to write a library in C# that can directly read MOBI dictionary files which will again produce binary StarDict files without any intermediary format.

When any of the above is completed I can update this thread.
Hey I followed your steps but when I get to the second stage I keep getting the message that it's "Not a dictionary file" - when I open the HTML on the web browser it definitely looks like a dictionary! and it looks to have unpacked it properly. No idea what to do, any ideas?
Thorns is offline   Reply With Quote
Old 10-18-2024, 03:51 PM   #12
nezih
Enthusiast
nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.
 
nezih's Avatar
 
Posts: 40
Karma: 14828
Join Date: Feb 2023
Device: Kobo Aura SE
Quote:
Originally Posted by Thorns View Post
Hey I followed your steps but when I get to the second stage I keep getting the message that it's "Not a dictionary file" - when I open the HTML on the web browser it definitely looks like a dictionary! and it looks to have unpacked it properly. No idea what to do, any ideas?
It may render like a dictionary on a browser but if it lacks the necessary idx tags the script can't parse the file.
nezih is offline   Reply With Quote
Old 10-18-2024, 03:59 PM   #13
Thorns
Member
Thorns began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Oct 2024
Device: Kobo
Quote:
Originally Posted by nezih View Post
It may render like a dictionary on a browser but if it lacks the necessary idx tags the script can't parse the file.
Is there any way around it? Anyway to get it to have the idx tags somehow?
Thorns is offline   Reply With Quote
Old 10-18-2024, 04:07 PM   #14
nezih
Enthusiast
nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.
 
nezih's Avatar
 
Posts: 40
Karma: 14828
Join Date: Feb 2023
Device: Kobo Aura SE
If it was a dictionary file, KindleUnpack should have added the necessary tags already. Can't tell much without seeing the original mobi file.
nezih is offline   Reply With Quote
Old 10-18-2024, 06:01 PM   #15
Thorns
Member
Thorns began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Oct 2024
Device: Kobo
Quote:
Originally Posted by nezih View Post
If it was a dictionary file, KindleUnpack should have added the necessary tags already. Can't tell much without seeing the original mobi file.
Have sent you a PM with the file if you wouldn't mind looking at it? Just the MOBI file. I wasn't sure if allowed to post here publicly. Would really appreciate any advice either way
Thorns is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
so purchased a book from the kindle store Alrayes Amazon Kindle 27 12-12-2018 09:05 AM
Transfer ALL Purchased Books to Kindle? HeatherA Amazon Kindle 6 03-25-2014 04:50 PM
Kindle purchased content portability mj72 Amazon Kindle 5 09-26-2010 05:33 PM
Hacks Kindle noob... purchased books can't open with Kindle Riptide Amazon Kindle 16 10-13-2009 08:30 PM
poor illustration on books purchased through CONNECT store jakeluck Sony Reader 14 03-06-2007 05:50 PM


All times are GMT -4. The time now is 12:51 AM.


MobileRead.com is a privately owned, operated and funded community.