Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > PocketBook > PocketBook Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-07-2022, 05:46 AM   #196
Eva_19
Junior Member
Eva_19 has learned how to read e-booksEva_19 has learned how to read e-booksEva_19 has learned how to read e-booksEva_19 has learned how to read e-booksEva_19 has learned how to read e-booksEva_19 has learned how to read e-booksEva_19 has learned how to read e-books
 
Posts: 3
Karma: 870
Join Date: Dec 2022
Device: Pocketbook
Thank you so much, Markismus! You're literally my saviour, the dictionary works fully! My gratitude is immense! I'm not a tech material but I made a vain attempt to covert that file and I nearly lost hope. I tapped random korean words and they were searched and translated instantly with your file. More million thanks :-)
Eva_19 is offline   Reply With Quote
Old 12-07-2022, 01:14 PM   #197
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
@AvijitBis The dictionary is converted. However, it is a glorious html mess. It seems to be the furthest I am willing to stretch the code. It's on pCloud.
Markismus is offline   Reply With Quote
Old 01-19-2023, 06:32 AM   #198
mandelgado58
Member
mandelgado58 began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jun 2022
Device: Pocketbook inkpad 3 pro
Quote:
Originally Posted by Markismus View Post
@mandelgado58 Diccionario Esencial Français Espagnol is reconstructed and uploaded here. It was a badly converted ePub, so there is a repetitive string inflexiones in the definitions. In the ePub there is even a missing image in front of it. So maybe you shouldn't let Calibre convert it and put the unencrypted, unconverted dictionary in a dropbox link. (Calibre unencrypts the documents when they are first added, no consecutive conversion is needed. )
This one is how the file is in Calibre library:

https://www.dropbox.com/s/29fulcrpv5...ocido.azw?dl=0

Thankyou!
mandelgado58 is offline   Reply With Quote
Old 01-25-2023, 11:38 AM   #199
Vi42per
Junior Member
Vi42per began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2023
Device: none
Dear Markismus

I would also like to ask for a help with a conversion of DE-EN dictionary from MOBI to Stardict format (allegedly natively understood by ONYX BOOX when placed properly into file structure) as I failed converting myself.

https://anonfiles.com/bcWdSdT9y3/German-English_mobi

Thank you in advance.
Vi42per is offline   Reply With Quote
Old 01-27-2023, 04:59 AM   #200
mandelgado58
Member
mandelgado58 began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jun 2022
Device: Pocketbook inkpad 3 pro
Quote:
Originally Posted by Markismus View Post
@mandelgado58 Diccionario Esencial Français Espagnol is reconstructed and uploaded here. It was a badly converted ePub, so there is a repetitive string inflexiones in the definitions. In the ePub there is even a missing image in front of it. So maybe you shouldn't let Calibre convert it and put the unencrypted, unconverted dictionary in a dropbox link. (Calibre unencrypts the documents when they are first added, no consecutive conversion is needed. )
Thankyou very much it works well, only the inflexions

Here is how Calibre keep it in the librery:

https://www.dropbox.com/s/29fulcrpv5...ocido.azw?dl=0
mandelgado58 is offline   Reply With Quote
Old 01-31-2023, 01:40 PM   #201
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
@Vi42per Nice! I already converted the EN-DE from the same publisher. This one doesn't convert, though. That one was probably an older version. Odd that you have a mobi-format from 2016. Seems Kindle was using azw-format by then.

@Mandelgado58 This file is also a mess. Would need a lot of extra work to convert. You're stuck with the string inflexions. However, you can download the xdxf-file, manually remove all those strings and convert it.

Last edited by Markismus; 01-31-2023 at 03:36 PM.
Markismus is offline   Reply With Quote
Old 02-27-2023, 01:08 PM   #202
San Zamoyski
Enthusiast
San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.
 
Posts: 48
Karma: 41612
Join Date: Jan 2015
Location: Poland, Warsaw
Device: Kindle 3G
Hi!

How to add language information to xdxf so convert.exe see it correctly? Currently my dictionary (cc-sjp.zabałaganionemiejsce.pl) is listed as 'other'.
See

Best regards!
San Zamoyski is offline   Reply With Quote
Old 02-28-2023, 01:18 AM   #203
eMole
Zealot
eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.
 
Posts: 130
Karma: 546310
Join Date: Jun 2011
Device: PocketBook Touch HD, PocketBook Era
I think that language grouping is hardwired for factory dicts. User dicts always appear under Other.

In my experience convert.exe ignores XDXF lang_from and lang_to fields, only reads the dictionary name field.
eMole is offline   Reply With Quote
Old 03-02-2023, 02:04 PM   #204
nezih
Enthusiast
nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.
 
nezih's Avatar
 
Posts: 34
Karma: 11014
Join Date: Feb 2023
Device: Kobo Aura SE
Quote:
Originally Posted by Vi42per View Post
Dear Markismus

I would also like to ask for a help with a conversion of DE-EN dictionary from MOBI to Stardict format (allegedly natively understood by ONYX BOOX when placed properly into file structure) as I failed converting myself.

https://anonfiles.com/bcWdSdT9y3/German-English_mobi

Thank you in advance.
Hi, I was able to convert your dictionary to StarDict format successfully. I unpacked it via mobitool and fed the resulting html to my script. Afterwards, I converted the textual xml format via StarDict editor but you can also use PyGlossary. If you want to try it yourself here is the link to my script's github repository: mobi2stardict
nezih is offline   Reply With Quote
Old 03-11-2023, 03:52 PM   #205
DenS
Connoisseur
DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.
 
Posts: 60
Karma: 2500000
Join Date: Apr 2021
Device: Kindle Paperwhite 5 SE
Quote:
Originally Posted by nezih View Post
If you want to try it yourself here is the link to my script's github repository: mobi2stardict
Hi @nezih. I ran your script at the windows prompt and was able to convert a .html dictionary to .xml. Next I used pyglossary to convert the .xml to stardict(.ifo). It worked great, Thanks!
But there is a dictionary, actually what I needed most, which I can't convert to .xml. The command I use at the prompt is this:
Code:
mobi2stardict.py --html-file "book.html" --fix-links --dict-name "Grande Dicionário de Português" --author "Porto Editora" --textual --chunked
And the prompt gives me this error:
Code:
Traceback (most recent call last):
  File "D:\Downloads\mobi2stardict\mobi2stardict.py", line 160, in <module>
    convert(args.html_file, args.dict_name, args.author, args.fix_links, args.gls, args.textual, args.chunked)
  File "D:\Downloads\mobi2stardict\mobi2stardict.py", line 115, in convert
    key     = ET.SubElement(article, "key").text = entry.HW
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "src\lxml\etree.pyx", line 1042, in lxml.etree._Element.text.__set__
  File "src\lxml\apihelpers.pxi", line 748, in lxml.etree._setNodeText
  File "src\lxml\apihelpers.pxi", line 736, in lxml.etree._createTextNode
  File "src\lxml\apihelpers.pxi", line 1541, in lxml.etree._utf8
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters
It might be useful to say that to extract the .mobi dictionary to .html I used the KindleUnpack caliber plugin.
To install BeautifulSoup and lxml I used the commands "pip install beautifulsoup4" and "pip install lxml". The Python version I'm using is 3.11.2.
Could you help me figure out what I'm doing wrong?
DenS is offline   Reply With Quote
Old 03-11-2023, 08:13 PM   #206
nezih
Enthusiast
nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.
 
nezih's Avatar
 
Posts: 34
Karma: 11014
Join Date: Feb 2023
Device: Kobo Aura SE
Quote:
Originally Posted by DenS View Post
Hi @nezih. I ran your script at the windows prompt and was able to convert a .html dictionary to .xml. Next I used pyglossary to convert the .xml to stardict(.ifo). It worked great, Thanks!
But there is a dictionary, actually what I needed most, which I can't convert to .xml. The command I use at the prompt is this:
Code:
mobi2stardict.py --html-file "book.html" --fix-links --dict-name "Grande Dicionário de Português" --author "Porto Editora" --textual --chunked
And the prompt gives me this error:
Code:
Traceback (most recent call last):
  File "D:\Downloads\mobi2stardict\mobi2stardict.py", line 160, in <module>
    convert(args.html_file, args.dict_name, args.author, args.fix_links, args.gls, args.textual, args.chunked)
  File "D:\Downloads\mobi2stardict\mobi2stardict.py", line 115, in convert
    key     = ET.SubElement(article, "key").text = entry.HW
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "src\lxml\etree.pyx", line 1042, in lxml.etree._Element.text.__set__
  File "src\lxml\apihelpers.pxi", line 748, in lxml.etree._setNodeText
  File "src\lxml\apihelpers.pxi", line 736, in lxml.etree._createTextNode
  File "src\lxml\apihelpers.pxi", line 1541, in lxml.etree._utf8
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters
It might be useful to say that to extract the .mobi dictionary to .html I used the KindleUnpack caliber plugin.
To install BeautifulSoup and lxml I used the commands "pip install beautifulsoup4" and "pip install lxml". The Python version I'm using is 3.11.2.
Could you help me figure out what I'm doing wrong?
Hi, If I remember correctly, I came across this problem recently. Most probably headwords include control characters. If you choose to convert to gls format(--gls) only, it will probably run fine. However, you would still need to substitute those with what they actually intended to show.
Open gls file via vscode, look for control chars. such as
Code:
BEL
,
Code:
ACK
etc. (You can use \p{C} in Find) Replace those with the intended characters. For example, in my problematic file, I replaced
Code:
BEL
with
Code:
ll
,
Code:
ACK
with
Code:
ch
.
nezih is offline   Reply With Quote
Old 03-12-2023, 01:02 AM   #207
DenS
Connoisseur
DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.
 
Posts: 60
Karma: 2500000
Join Date: Apr 2021
Device: Kindle Paperwhite 5 SE
Quote:
Originally Posted by nezih View Post
You can use \p{C} in Find) Replace those with the intended characters.
Sorry, do I have to put \p{C} here?
Attached Thumbnails
Click image for larger version

Name:	2.png
Views:	79
Size:	17.0 KB
ID:	200264  

Last edited by DenS; 03-12-2023 at 01:06 AM.
DenS is offline   Reply With Quote
Old 03-12-2023, 08:25 AM   #208
nezih
Enthusiast
nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.
 
nezih's Avatar
 
Posts: 34
Karma: 11014
Join Date: Feb 2023
Device: Kobo Aura SE
Quote:
Originally Posted by DenS View Post
Sorry, do I have to put \p{C} here?
Use \p{C} to glance at different control characters. Then, replace those on a case by case basis. Sorry if I can't be of help but without access to dictionary my assistance will be limited.
nezih is offline   Reply With Quote
Old 03-12-2023, 10:33 AM   #209
DenS
Connoisseur
DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.DenS ought to be getting tired of karma fortunes by now.
 
Posts: 60
Karma: 2500000
Join Date: Apr 2021
Device: Kindle Paperwhite 5 SE
Quote:
Originally Posted by nezih View Post
Use \p{C} to glance at different control characters. Then, replace those on a case by case basis. Sorry if I can't be of help but without access to dictionary my assistance will be limited.
I sent a dm with the link (dropbox) of the dictionary
DenS is offline   Reply With Quote
Old 03-12-2023, 11:18 AM   #210
nezih
Enthusiast
nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.nezih can tame squirrels without the assistance of a chair or a whip.
 
nezih's Avatar
 
Posts: 34
Karma: 11014
Join Date: Feb 2023
Device: Kobo Aura SE
Quote:
Originally Posted by DenS View Post
I sent a dm with the link (dropbox) of the dictionary
I think there might be a problem with KindleUnpack because when unpacked via mobitool, the whole process completed without problem. I'm attaching the Windows mobitool binaries if you want to try it yourself.(Use at your own risk!)
Code:
mobitool -s filename.mobi
Attached Files
File Type: zip mobitool.zip (2.84 MB, 77 views)
nezih is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pocketbook dictionary logan PocketBook 322 03-05-2024 09:48 AM
Dictionary coversion from .mobi to pocketbook format? doctorat PocketBook 16 07-01-2020 05:34 PM
Webster's 1913 Dictionary in Pocketbook Format luqmaninbmore PocketBook 8 05-27-2020 10:41 AM
SW>EN Dictionary for Pocketbook tttrine PocketBook 3 06-09-2015 06:01 AM


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


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