01-20-2019, 04:32 PM | #1246 | |
The Grand Mouse 高貴的老鼠
Posts: 71,496
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
|
|
01-21-2019, 07:45 PM | #1247 |
Wizard
Posts: 1,059
Karma: 3000026
Join Date: Feb 2012
Location: Cape Canaveral
Device: Kindle Scribe
|
OK, thank you!
|
05-01-2019, 12:24 PM | #1248 |
Junior Member
Posts: 3
Karma: 10
Join Date: May 2019
Device: Kindle Paperwhite
|
How to convert a .mobi dictionary to a txt file?
Hi pdurrant,
Thank you for maintaining the KindleUnpack library. Really appreciate it. I am wondering if we can convert a .mobi dictionary file into a txt file. Each line is one word and its definition separated by a tab. The reason I'm asking is: I use KindleMate to convert words in Vocabulary Builder to Anki cards. And I want to use my own dictionary (Longman) when creating the Anki cards. Currently KindleMate only takes dictionary in txt format. That's why I need to convert my mobi dictionary file into a txt. Any help would be greatly appreciated. Thank you, Hannah |
05-01-2019, 12:51 PM | #1249 |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Kindleunpack won't help you convert it to text. It will help you to convert your mobi to html. From there, you'd need to use something else to get it into a text-only format.
Just note that there isn't 100% support for kindle dictionaries. Some things work. Some things don't. |
05-01-2019, 02:25 PM | #1250 | |
Junior Member
Posts: 3
Karma: 10
Join Date: May 2019
Device: Kindle Paperwhite
|
Thank you DiapDealer!
In my case, it doesn't seem to work. I can't even convert the mobi dictionary to html. No useful error message either. Do you know if there is any other library that can parse mobi files? It doesn't have to be python. Thank you again, Hannah Quote:
|
|
05-01-2019, 04:14 PM | #1251 |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
It's not the mobi format in general that's the problem. It's the extra bits that dictionaries use. There's always been issues with infections and such. I'm not the expert there, so I can't really say what the trouble is with mobi-dictionaries.
You might try calibre. I don't know if it will do any better on dictionaries. But more than likely, anything that claims to convert/unpack mobi files/dictionaries is probably based on calibre or KindleUnpack code (and thus the same limitations). And a lot of the mobi stuff in KindleUnpack was ported from the older Perl-based Mobiperl project. Somebody blasts though every now and again with high hopes of creating a C/C++ or C# version, but I'm not sure if anyone has a fully-functional alternative yet. Last edited by DiapDealer; 05-01-2019 at 04:17 PM. |
05-01-2019, 10:22 PM | #1252 | |
Junior Member
Posts: 3
Karma: 10
Join Date: May 2019
Device: Kindle Paperwhite
|
Yea, I can understand why. I tried Calibre and it gave me "Memory Error".
But still, thank you for taking the time to explain to me. Appreciate it. With gratitude, Hannah Quote:
|
|
05-02-2019, 08:14 AM | #1253 |
Grand Sorcerer
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
That error is common if you try to convert a large complex book, such as a dictionary, using the 32-bit version of calibre. Switching to the 64-bit version usually allows conversion to complete, however it can take hours or even days to do so.
|
05-13-2019, 08:30 AM | #1254 |
Guru
Posts: 653
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
|
Is there anything I can do to get kindle samples to work for extracting epub?
|
05-13-2019, 08:48 AM | #1255 |
The Grand Mouse 高貴的老鼠
Posts: 71,496
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
|
07-19-2019, 06:31 PM | #1256 |
Sigil Developer
Posts: 7,637
Karma: 5433388
Join Date: Nov 2009
Device: many
|
If jhowell is okay with it, I would like to pull his kfx unpack code and epub-like conversion code in kindleunpack so users have one stop shopping. There is/was also an official ION github code library someplace that I once saw. Perhaps pulling that lib in (as long as the licenses are compatible), would make sense. We could just add interface routines to his code so we can easily keep up with his changes.
Doug, Paul, and jhowell, what do you think? |
07-19-2019, 06:42 PM | #1257 |
BLAM!
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
I see Amazon has a few ION-related stuff on GH, f.g., this in Python: https://github.com/amzn/ion-python
Was that what you were thinking of? |
07-19-2019, 07:02 PM | #1258 |
Sigil Developer
Posts: 7,637
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Yes that looks like it. It has an Apache license file. If jhowell think it might be useful, we could pull it in, but if his code would not benefit from it, that is fine too.
|
07-19-2019, 07:20 PM | #1259 |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm OK with the idea, but to what extent? Is there any part of the current KindleUnpack codebase that will be useful in the venture? I admit that I'm woefully out of the loop RE KFx, but I was under the impression that it was a completely different beast altogether. Much like Topaz was (which we didn't incorporate). Is there even a mobi header/exth to contend with?
What would the unpacked structure look like? I guess I'm just trying to determine if we will be doing more converting, than actual unpacking/inspection. |
07-19-2019, 07:34 PM | #1260 | |
Grand Sorcerer
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
Quote:
What I have to share at this point is contained in the latest release of the KFX Input plugin for calibre. It is not in GitHub at the moment and probably won’t be any time soon. The calibre plugin and CLI are at the top level, with more generic code for handling KFX contained in the kfxlib module. My code contains my own implementation of Amazon Ion. It would probably be more trouble than it is worth to integrate Amazon’s. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can i rotate text and insert images in Mobi and EPUB? | JanGLi | Kindle Formats | 5 | 02-02-2013 04:16 PM |
PDF to Mobi with text and images | pocketsprocket | Kindle Formats | 7 | 05-21-2012 07:06 AM |
Mobi files - images | DWC | Introduce Yourself | 5 | 07-06-2011 01:43 AM |
pdf to mobi... creating images rather than text | Dumhed | Calibre | 5 | 11-06-2010 12:08 PM |
Transfer of images on text files | anirudh215 | 2 | 06-22-2009 09:28 AM |