05-13-2020, 06:55 AM | #16 |
Groupie
Posts: 175
Karma: 1044642
Join Date: Jun 2017
Device: changing frequently
|
@Markismus
I know KindleUnpack is not your code, but maybe you can help me: I tried to unpack a mobi dictionary I converted from K4PC azw into mobi. It always tells me "Unpacking failed" Do you probably know what the problem is? EDIT: Okay, nevermind. I used the Calibre plugin now and it worked flawlessly Now I'm going to setup (Strawberry) Perl and try your converter Last edited by AnimalOfArt; 05-13-2020 at 07:16 AM. |
05-13-2020, 07:56 AM | #17 |
Guru
Posts: 897
Karma: 149877
Join Date: Jul 2013
Location: Netherlands
Device: Cracked HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
|
Kindle unpack generates a lot of data. Most interesting are the resulting xml-files. One is raw and the other is interpreted. If the interpretation of the raw xml fails, you get this error from Kindle Unpack.
Unfortunately, my code starts from the interpreted xml. Wish I had done that differently! Also, the reason why you find so few mobi dictionary converters, is that the format is very loose. So whether any converter works, depends on if it has seen such xml-code before. it is hit and miss for new dictionaries. If you find a workaround that is able to fix the format of a Kindle or mobi-dictionary into one fixed order, I am willing to write an extra importer for it. However, I haven’t got the time to write a generic importer based on heuristics. |
Advert | |
|
05-13-2020, 09:03 AM | #18 | |||
Groupie
Posts: 175
Karma: 1044642
Join Date: Jun 2017
Device: changing frequently
|
For now, I converted the mobi into book.html and I want to convert it into xdxf for stardict conversion.
When I set it up i get this strange output Quote:
Quote:
EDIT: Ah nevermind. The command path parameter in the command line should also be relative But now I get this error: Quote:
Last edited by AnimalOfArt; 05-13-2020 at 09:26 AM. |
|||
05-13-2020, 10:29 AM | #19 |
Guru
Posts: 897
Karma: 149877
Join Date: Jul 2013
Location: Netherlands
Device: Cracked HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
|
No. I would rather toggle the conversion of gif-files off. Search for the toggle governing it, please.
I is dependent on imagemagick, which only works on Linux. |
05-13-2020, 12:30 PM | #20 | |
Groupie
Posts: 175
Karma: 1044642
Join Date: Jun 2017
Device: changing frequently
|
Ok that problemd is out of the way. It seemed to work until this message came up:
Quote:
|
|
Advert | |
|
05-13-2020, 03:22 PM | #21 |
Guru
Posts: 897
Karma: 149877
Join Date: Jul 2013
Location: Netherlands
Device: Cracked HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
|
https://github.com/Markismus/PocketB...kdic.pl#L1000:
Code:
open( FILE, "$FileName" ) || (warn "Cannot open $FileName: $!\n" and die); } Oddly enough, the message should have generated the whole warning, not just the '$!' part. If this is an systemic error, than no files can be loaded anywhere in Windows, which seems odd: This is a very basic operation. Could you have given the wrong filename? Maybe use https://www.cygwin.com/ to see whether it is Linux/Windows related or your input? Last edited by Markismus; 05-13-2020 at 03:24 PM. |
05-13-2020, 03:47 PM | #22 |
Groupie
Posts: 175
Karma: 1044642
Join Date: Jun 2017
Device: changing frequently
|
Before I try it with cygwin:
What is $FileName supposed to be? |
05-13-2020, 04:01 PM | #23 |
Guru
Posts: 897
Karma: 149877
Join Date: Jul 2013
Location: Netherlands
Device: Cracked HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
|
It’s supposed to be the filename in the current path or an relative path/filename or an absolute path/filename.
It’s what is given to the subroutine as its first argument: https://github.com/Markismus/PocketB...ookdic.pl#L989 Last edited by Markismus; 05-13-2020 at 04:03 PM. |
05-13-2020, 04:36 PM | #24 | |
Groupie
Posts: 175
Karma: 1044642
Join Date: Jun 2017
Device: changing frequently
|
I use this command to start the script
Quote:
The script seems to find the book.html inside C:/Users/Animal/Downloads/PocketbookDic/mobi7 because it creates a copy of it named as test_html_indexentries.html inside the base dir. There is also a $FileName variable in the config on line 31. Is this for the output dictionary file and is this related to $FileName at line 989? |
|
05-14-2020, 02:24 AM | #25 |
Guru
Posts: 897
Karma: 149877
Join Date: Jul 2013
Location: Netherlands
Device: Cracked HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
|
The filename at the beginning of the script is used when none is given at the command line.
The test is just a test to see whether the script works. You can toggle its creation off in the start section. I think that your workaround KindleUnpack isn’t working. So you provide a filename. The script uses it to run KindleUnpack and tries to open its result. However, since KindleUnpack fails the file is not created and as the script tries to open it and can’t, it generates a warning. |
05-14-2020, 02:32 AM | #26 | |||
Groupie
Posts: 175
Karma: 1044642
Join Date: Jun 2017
Device: changing frequently
|
I have no KindleUnpack workaround in the script.
I put the mobi file into Calibre and then KindleUnpack it with it. I do not set KindleUnpack in the Script. It is still your directory and because of that I get this Quote:
Quote:
EDIT: Ok, I tried it with cygwin, but that is worse. I'm getting this error Quote:
Last edited by AnimalOfArt; 05-14-2020 at 03:34 AM. |
|||
05-14-2020, 04:07 AM | #27 |
Guru
Posts: 897
Karma: 149877
Join Date: Jul 2013
Location: Netherlands
Device: Cracked HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
|
Why don’t you send me a link for the dictionary? Maybe, using Dropbox? I’ll try and convert it. If it’s an error in the code, I’ll fix it. If it’s an unknown format of mobi dictionary, I’ll add warnings that make it explicit.
Who knows, maybe we’ll get lucky and conversion on Linux goes without a hitch. |
05-14-2020, 04:28 AM | #28 |
Groupie
Posts: 175
Karma: 1044642
Join Date: Jun 2017
Device: changing frequently
|
Thank you, I send you a PM
|
05-14-2020, 08:48 AM | #29 |
Guru
Posts: 897
Karma: 149877
Join Date: Jul 2013
Location: Netherlands
Device: Cracked HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
|
The Duden 7. Auflage was already converted and uploaded here.
The PONS EN-DE dictionary is from 2016 Kindle ( based on wordlists from 2011) converted to mobi? I have the original PONS EN-DE mobi dictionaries from 2007. Looking at your conversion, it has a lot of missing glyphs: Calibre isn't the way to convert it! It also garbled the code, resulting in non-conform XML. Although, it's interesting to check why the code didn't filter that out, it's also a surefire way to get a crappy Stardict dictionary. Could you send me a link to the Kindle version? |
05-14-2020, 09:05 AM | #30 |
Groupie
Posts: 175
Karma: 1044642
Join Date: Jun 2017
Device: changing frequently
|
I guess you won't be able to open the original azw file because they have DRM bound to my account. This is the purest mobi file I can give you. I took the azw from my kindle content folder, put it into calibre, and it immediately DeDRMed and converted it to mobi.
However, I can send you the amazon link to the dictionary, if it's that what you have asked for: https://www.amazon.de/W%C3%B6rterbuc...dp/B01NA9LE9T/ What was the source of the Duden you converted? Was it from Kindle? Last edited by AnimalOfArt; 05-14-2020 at 09:40 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convert MOBI dictionary to other formats | sk8terek | Conversion | 1 | 06-07-2016 09:31 PM |
How to convert stardict dictionary? | omk3 | PocketBook | 3 | 06-09-2015 05:10 PM |
Convert Text Dictionary to Mobi | jribeiro | Kindle Formats | 3 | 03-19-2011 01:18 PM |
Convert eReader Dictionary to MOBI? | notyou | Other formats | 2 | 06-29-2010 01:37 AM |