Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-12-2010, 04:40 AM   #1
ChristopherTD
Addict
ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.
 
ChristopherTD's Avatar
 
Posts: 304
Karma: 1003456
Join Date: Apr 2008
Location: London. UK
Device: Marvin Reader on iPad Air (via Calibre)
Converting Mobi Dictionaries to other formats

Is there a way to convert Mobi Dictionaries to another format and have the links and lookup options preserved?

I tried converting to ePub in Calibre, but the links were broken and the "Lookup a word" option at the start of the dictionary didn't work either?

Is there a way to do this?

regards
Christo
ChristopherTD is offline   Reply With Quote
Old 07-13-2010, 08:08 AM   #2
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: 31,455
Karma: 87141754
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by ChristopherTD View Post
Is there a way to convert Mobi Dictionaries to another format and have the links and lookup options preserved?

I tried converting to ePub in Calibre, but the links were broken and the "Lookup a word" option at the start of the dictionary didn't work either?

Is there a way to do this?

regards
Christo
Unpack the mobi dictionary (mobiunpack.py). Look at the HTML-like file. Work out how to convert into the your desired source format. Convert it. Compile into your destination format.

I don't think there are any current tools form converting Mobipocket dictionaries into other formats.
pdurrant is offline   Reply With Quote
Old 07-15-2010, 03:33 AM   #3
ChristopherTD
Addict
ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.
 
ChristopherTD's Avatar
 
Posts: 304
Karma: 1003456
Join Date: Apr 2008
Location: London. UK
Device: Marvin Reader on iPad Air (via Calibre)
OK - I will have a peek at the files and see if I can make sense of it. Dictionaries do seem to be handled differently from a conventional book (obviously). I just hoped the steps were already known!
ChristopherTD is offline   Reply With Quote
Old 11-13-2010, 01:35 AM   #4
osnova
Kindler of the Flame
osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.
 
osnova's Avatar
 
Posts: 583
Karma: 646016
Join Date: Oct 2009
Location: US of A
Device: K DX,3,KT,KP,KF, KFHD; Nook C, PRS600, iPad, Xoom, N900, N810, Zaurus
Unless I am mistaken mobiunpack.py does not preserve all of the original tags and structure of the dictionary and loses lots of information.
osnova is offline   Reply With Quote
Old 11-13-2010, 03:41 AM   #5
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: 31,455
Karma: 87141754
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by osnova View Post
Unless I am mistaken mobiunpack.py does not preserve all of the original tags and structure of the dictionary and loses lots of information.
That's a surprise. It certainly extracts all the pseudo-html content. Perhaps there is info in the EXTH header fields that are important.

It should be fairly straightforward to tweak mobiunpack to also dump out all the EXTH fields in some simple text format - why not give it a go?
pdurrant is offline   Reply With Quote
Old 12-21-2010, 06:24 AM   #6
naisren
Enthusiast
naisren began at the beginning.
 
Posts: 38
Karma: 12
Join Date: Jul 2009
Device: ppc
Quote:
Originally Posted by pdurrant View Post
That's a surprise. It certainly extracts all the pseudo-html content. Perhaps there is info in the EXTH header fields that are important.

It should be fairly straightforward to tweak mobiunpack to also dump out all the EXTH fields in some simple text format - why not give it a go?
As I know, mobi dictionary has mobi own tags, such as
Code:
<idx:entry>..</idx:entry>
<idx:orth>Label of entry in Index</idx:orth>
<idx:key name="xx">..</idx:key>
Obviously, we could not find the tags in unpacked html file.

So I could not generate it as what it was after unpack the dic.
naisren is offline   Reply With Quote
Old 12-21-2010, 07:15 AM   #7
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 63,223
Karma: 41342835
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
Quote:
Originally Posted by ChristopherTD View Post
Is there a way to convert Mobi Dictionaries to another format and have the links and lookup options preserved?

I tried converting to ePub in Calibre, but the links were broken and the "Lookup a word" option at the start of the dictionary didn't work either?
What is it in the ePub reader that you were expecting would do the lookup? This is a function of the reader software, not the dictionary itself.
HarryT is offline   Reply With Quote
Old 12-21-2010, 08:16 AM   #8
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: 31,455
Karma: 87141754
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by naisren View Post
As I know, mobi dictionary has mobi own tags, such as
Code:
<idx:entry>..</idx:entry>
<idx:orth>Label of entry in Index</idx:orth>
<idx:key name="xx">..</idx:key>
Obviously, we could not find the tags in unpacked html file.

So I could not generate it as what it was after unpack the dic.
Oh, I'd forgotten that the dictionary had weird tags. If you look at the mobiunpack script, you'll find sections commented out that will output the contents of the mobipocket file completely raw, and with various stages of conversion. Probably the stage just after adding anchors and updating links would work best for you. Just remove the # tags appropriately to enable to extra output files.
pdurrant is offline   Reply With Quote
Old 01-03-2011, 06:23 AM   #9
naisren
Enthusiast
naisren began at the beginning.
 
Posts: 38
Karma: 12
Join Date: Jul 2009
Device: ppc
Quote:
Originally Posted by pdurrant View Post
Oh, I'd forgotten that the dictionary had weird tags. If you look at the mobiunpack script, you'll find sections commented out that will output the contents of the mobipocket file completely raw, and with various stages of conversion. Probably the stage just after adding anchors and updating links would work best for you. Just remove the # tags appropriately to enable to extra output files.
I removed the #tag and tried again, got the same result. Thanks for your attention.
naisren is offline   Reply With Quote
Old 01-03-2011, 09:59 AM   #10
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: 31,455
Karma: 87141754
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by naisren View Post
I removed the #tag and tried again, got the same result. Thanks for your attention.
Hmm.. I've just checked it myself, and I was wrong. It seems that all the tags get compiled into the usual sort of Mobipocket coding.

I suspect that it might be possible to process the HTML to convert it back into the tagged format, because it is very regularly coded. But it would be quite a lot of effort.

Sorry for misleading you.
pdurrant is offline   Reply With Quote
Old 01-03-2011, 04:46 PM   #11
KevinH
Guru
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: 843
Karma: 349410
Join Date: Nov 2009
Device: many
Hi,

I looked at a Mobi dictionary I had by running strings and found it had a number of additional sections not usually found in a normal mobi book. These section types names were:

INDX, IDXT, ORDT, SPL1, SPL2, SPL3, SPL4, SPL5, SPL6

If I run "strings" on a dictionary that is a .mobi file, I find a sequences of INDX followed by selected words that span the alphabet ending with a IDXT. This looks like the first index table and that redirects you by comparison to the next layer of INDX tables which are much longer and seem to be all of the words in the dictionary in one of the segments covered in the first INDX table.

These must be generated by the missing code you noticed.

You could possibly modify mobiunpack to find and identify and dump these extra sections and use this information to put back the original code. Unfortunately, I have no idea which bytes in the header point to the number of each of these section types and their starting offset. So it would take some exploring to reverse all of this out.

The missing code related pieces are in the dictionary .mobi, but without info on how to find them and use them they are not very useful.
KevinH is offline   Reply With Quote
Old 01-07-2011, 07:52 AM   #12
naisren
Enthusiast
naisren began at the beginning.
 
Posts: 38
Karma: 12
Join Date: Jul 2009
Device: ppc
Quote:
Originally Posted by pdurrant View Post
Hmm.. I've just checked it myself, and I was wrong. It seems that all the tags get compiled into the usual sort of Mobipocket coding.

I suspect that it might be possible to process the HTML to convert it back into the tagged format, because it is very regularly coded. But it would be quite a lot of effort.

Sorry for misleading you.
You are so humble and responsible and I respec you very much.
I enjoyed your every word and is feeling warm, without you (and others) , we could not get close to the secret of mobi book.
naisren is offline   Reply With Quote
Old 01-07-2011, 08:05 AM   #13
naisren
Enthusiast
naisren began at the beginning.
 
Posts: 38
Karma: 12
Join Date: Jul 2009
Device: ppc
Mobi book on PC or PPC(WM) have some features, which Kindle doesn't has. Although Mobipocket has a back page bug, I found no other ereader replaces it completely in coming future.

With Mobi commercial dictinary, I just want to learn how to make it or some tips.
From dic-unpacked html, I observe that it use database and javascript. Using database, it could fine the search function and make the full search look very attactive.
naisren is offline   Reply With Quote
Old 01-07-2011, 12:43 PM   #14
susan_cassidy
Wizard
susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.
 
Posts: 1,851
Karma: 1698650
Join Date: Jan 2009
Device: Kindle, iPad (not used much for reading)
The Mobipocket info on dictionaries might be helpful: http://www.mobipocket.com/dev/articl...e=indexing.htm.

For unpacking a .mobi to html, you might want to try the MobiPerl program mobi2html, in raw mode.
susan_cassidy is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting Encarta Dictionaries to Mobipocket Tutorial owl123 Kindle Formats 16 06-16-2011 03:35 PM
Converting Formats Neelly Sony Reader 10 09-26-2010 05:30 PM
converting from standard mobi to compressed mobi noideaatall Kindle Formats 6 07-11-2010 03:10 PM
converting a lit (and prc) dictionaries to stardict Brandobras Workshop 1 06-23-2010 03:40 AM
Converting StarDict (and other) dictionaries to iPad owl123 Apple Devices 0 06-22-2010 06:38 AM


All times are GMT -4. The time now is 08:24 PM.


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