Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 01-20-2019, 04:32 PM   #1246
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,496
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by mergen3107 View Post
@pdurrant, thank you!
Can you please tell me:
1) Can KindleUnpack extract only TOC? For the purpose of my project I don't need all raw files;
2) How can I get location of TOC entries in a mobi8 file? So far, I can see that it only provides ordered TOC entry reference numbers. As a temporary solution to find percentage of a chapter is to calculated respective cumulative file sizes, but that's very rough.
The python code of KindleUnpack should tell you how to obtain all the information you need, if it's actually in the file.
pdurrant is offline   Reply With Quote
Old 01-21-2019, 07:45 PM   #1247
mergen3107
Wizard
mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.
 
mergen3107's Avatar
 
Posts: 1,059
Karma: 3000026
Join Date: Feb 2012
Location: Cape Canaveral
Device: Kindle Scribe
OK, thank you!
mergen3107 is offline   Reply With Quote
Old 05-01-2019, 12:24 PM   #1248
xeshxzh
Junior Member
xeshxzh began at the beginning.
 
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
xeshxzh is offline   Reply With Quote
Old 05-01-2019, 12:51 PM   #1249
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
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.
DiapDealer is offline   Reply With Quote
Old 05-01-2019, 02:25 PM   #1250
xeshxzh
Junior Member
xeshxzh began at the beginning.
 
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:
Originally Posted by DiapDealer View Post
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.
xeshxzh is offline   Reply With Quote
Old 05-01-2019, 04:14 PM   #1251
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
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.
DiapDealer is offline   Reply With Quote
Old 05-01-2019, 10:22 PM   #1252
xeshxzh
Junior Member
xeshxzh began at the beginning.
 
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:
Originally Posted by DiapDealer View Post
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.
xeshxzh is offline   Reply With Quote
Old 05-02-2019, 08:14 AM   #1253
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by xeshxzh View Post
Yea, I can understand why. I tried Calibre and it gave me "Memory Error".
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.
jhowell is offline   Reply With Quote
Old 05-13-2019, 08:30 AM   #1254
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
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?
patrik is offline   Reply With Quote
Old 05-13-2019, 08:48 AM   #1255
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,496
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by patrik View Post
Is there anything I can do to get kindle samples to work for extracting epub?
Kindle samples are not complete files, so I expect that the unpack fall over when it gets to the bit of the file that's missing.
pdurrant is offline   Reply With Quote
Old 07-19-2019, 06:31 PM   #1256
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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?
KevinH is offline   Reply With Quote
Old 07-19-2019, 06:42 PM   #1257
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
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?
NiLuJe is offline   Reply With Quote
Old 07-19-2019, 07:02 PM   #1258
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is offline   Reply With Quote
Old 07-19-2019, 07:20 PM   #1259
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Doug, Paul, and jhowell, what do you think?
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.
DiapDealer is offline   Reply With Quote
Old 07-19-2019, 07:34 PM   #1260
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by KevinH View Post
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...
I am fine with anyone reusing my code. You didn’t need to ask, but thanks for doing so.

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.

Quote:
Originally Posted by KevinH View Post
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.
My code contains my own implementation of Amazon Ion. It would probably be more trouble than it is worth to integrate Amazon’s.
jhowell is offline   Reply With Quote
Reply


Forum Jump

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 PDF 2 06-22-2009 09:28 AM


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


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