Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 05-13-2020, 06:55 AM   #16
AnimalOfArt
Groupie
AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.
 
AnimalOfArt's Avatar
 
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.
AnimalOfArt is offline   Reply With Quote
Old 05-13-2020, 07:56 AM   #17
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
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.
Markismus is offline   Reply With Quote
Advert
Old 05-13-2020, 09:03 AM   #18
AnimalOfArt
Groupie
AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.
 
AnimalOfArt's Avatar
 
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:
Local path is C:/Users/Animal/Downloads/PocketbookDic/mobi7. (This is where the book.html is)
Full path is C:/Users/Animal/Downloads/PocketbookDic/C:/Users/Animal/Downloads/PocketbookDic/mobi7
and then if fails with this message
Quote:
Can't find C:/Users/Animal/Downloads/PocketbookDic/C:/Users/Animal/Downloads/PocketbookDic/mobi7/Images/image15902.gif. Quitting.
Died at pocketbookdic.pl line 738.
Why does the Full path is so strange and what do I need to that to make it right?


EDIT: Ah nevermind. The command path parameter in the command line should also be relative

But now I get this error:

Quote:
Unzulässiger Parameter - /Users
Cannot open C:/Users/Animal/Downloads/PocketbookDic/mobi7/Images/image15902.gif.png: No such file or directory
Died at pocketbookdic.pl line 1000.
The script attaches an .png extension to an existing gif file, image15902.gif. And this causes the script to end. Should I add png to all the gif files now?

Last edited by AnimalOfArt; 05-13-2020 at 09:26 AM.
AnimalOfArt is offline   Reply With Quote
Old 05-13-2020, 10:29 AM   #19
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
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.
Markismus is offline   Reply With Quote
Old 05-13-2020, 12:30 PM   #20
AnimalOfArt
Groupie
AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.
 
AnimalOfArt's Avatar
 
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:
Cannot open C:/Users/Animal/Downloads/PocketbookDic/mobi7/: No such file or directory
Died at pocketbookdic.pl line 1000.
But I can tell your for sure, this directory exists
AnimalOfArt is offline   Reply With Quote
Advert
Old 05-13-2020, 03:22 PM   #21
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
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);
  }
It's part of the basic subroutine to open file. Open filehandle or warn. So it can't find the file.
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.
Markismus is offline   Reply With Quote
Old 05-13-2020, 03:47 PM   #22
AnimalOfArt
Groupie
AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.
 
AnimalOfArt's Avatar
 
Posts: 175
Karma: 1044642
Join Date: Jun 2017
Device: changing frequently
Before I try it with cygwin:

What is $FileName supposed to be?
AnimalOfArt is offline   Reply With Quote
Old 05-13-2020, 04:01 PM   #23
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
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.
Markismus is offline   Reply With Quote
Old 05-13-2020, 04:36 PM   #24
AnimalOfArt
Groupie
AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.
 
AnimalOfArt's Avatar
 
Posts: 175
Karma: 1044642
Join Date: Jun 2017
Device: changing frequently
I use this command to start the script
Quote:
perl pocketbookdic.pl mobi7/book.html de
My base dir is set to "C:/Users/Animal/Downloads/PocketbookDic"

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?
AnimalOfArt is offline   Reply With Quote
Old 05-14-2020, 02:24 AM   #25
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
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.
Markismus is offline   Reply With Quote
Old 05-14-2020, 02:32 AM   #26
AnimalOfArt
Groupie
AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.
 
AnimalOfArt's Avatar
 
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:
Can't find 'kindleunpack.py' in /home/mark/git/KindleUnpack/lib. Cannot handle mobi dictionaries.
Also I get this message:

Quote:
Converting indexentries from HTML to XDXF. This will take some time. 20200514 08:37:21
So KindleUnpack is just for extracting mobi into book.html and images. As I have done that already and directly pointed the script to the book.html, KindleUnpack should be out of the way.



EDIT: Ok, I tried it with cygwin, but that is worse.

I'm getting this error

Quote:
Can't find home/Animal/PocketbookDic/dict/mobi7/Images/image15902.gif. Quitting.
Died at pocketbookdic.pl line 738.
Although this path and file exists.

Last edited by AnimalOfArt; 05-14-2020 at 03:34 AM.
AnimalOfArt is offline   Reply With Quote
Old 05-14-2020, 04:07 AM   #27
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
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.
Markismus is offline   Reply With Quote
Old 05-14-2020, 04:28 AM   #28
AnimalOfArt
Groupie
AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.
 
AnimalOfArt's Avatar
 
Posts: 175
Karma: 1044642
Join Date: Jun 2017
Device: changing frequently
Thank you, I send you a PM
AnimalOfArt is offline   Reply With Quote
Old 05-14-2020, 08:48 AM   #29
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
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?
Markismus is offline   Reply With Quote
Old 05-14-2020, 09:05 AM   #30
AnimalOfArt
Groupie
AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.
 
AnimalOfArt's Avatar
 
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.
AnimalOfArt is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 01:38 AM.


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