View Single Post
Old 09-05-2024, 06:26 AM   #5
DJUNGELSKOG
Connoisseur
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: 67
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 06:28 AM.
DJUNGELSKOG is offline   Reply With Quote