|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,800
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
dictutil: Tools, documentation, and libraries related to Kobo dictionaries
dictutil
Tools, documentation, and libraries related to Kobo dictionaries (and a few converted ones). ___ This project contains a collection of tools and libraries to work with Kobo dictionaries, plus comprehensive documentation of Kobo's dictionary format. Unlike previous attempts at working with Kobo dictionaries, dictutil has full support for all features supported by nickel (word prefixes, unicode, variants, images, etc), with a focus on simplicity, correctness (prefix generation and other features are directly tested against libnickel's code and regexps, v1/v2 dictionaries are differentiated), and completeness (most of the research was done by reverse-engineering libnickel). In addition, it has a custom format for creating Kobo dictionaries which has a simple syntax and full support for all features. Dictutil consists of multiple tools and libraries:
See the website for more details and examples. Quick reference: dictgen: Spoiler:
dictgen dictfile format: Spoiler:
dictutil: Spoiler:
dictutil install: Spoiler:
dictutil uninstall: Spoiler:
dictutil pack: Spoiler:
dictutil unpack: Spoiler:
dictutil prefix: Spoiler:
gotdict-convert: Spoiler:
webster1913-convert: Spoiler:
dictzip-decompile: Spoiler:
Download | Website Last edited by geek1011; 07-14-2020 at 07:13 PM. Reason: v0.3.2 |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,800
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Dictionaries
This post contains a pre-built dictionaries converted using the tools in examples/*-convert. Links to the source dictfiles are also included for use as examples, for merging with your own dictionaries, or for editing. Webster's 1913 Unabridged Dictionary (from gutenberg.org/ebooks/29765)
GOTDict (from github.com/wjdp/gotdict)
Generated by dictutil v0.3.1. Last edited by geek1011; 07-09-2020 at 07:18 PM. Reason: v0.3.1 |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,800
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Changelogs
v0.3.1: Spoiler:
v0.3.0: Spoiler:
v0.2.1: Spoiler:
v0.2.0: Spoiler:
v0.1.2: Spoiler:
v0.1.1: Spoiler:
v0.1.0: Spoiler:
Last edited by geek1011; 07-08-2020 at 05:13 PM. Reason: v0.3.1 |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,800
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
reserved
Last edited by geek1011; 03-07-2020 at 09:42 AM. |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,800
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
I've released v0.1.1 with some small fixes to the converted Webster's dictionary, and a fix for segfaults from marisa on Windows, and v0.1.2 with a fix for file permissions on Windows. Thanks to Semwize for reporting the issues on Windows!
Last edited by geek1011; 03-06-2020 at 02:53 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 895
Karma: 270670
Join Date: Jun 2016
Device: Kobo
|
Works
![]() It would be great to add stardict converter (xml) -> df and very good - the ability to convert dicthtml -> df |
![]() |
![]() |
![]() |
#7 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 167
Karma: 38898
Join Date: Jul 2017
Location: Poland
Device: PocketBok Era, Kindle Oasis 3, Bookeen Diva HD
|
@geek1011 please tell me:
- can I add my custom dictionary (Polish) using dicutil? dictutil install dicthtml_pl.zip - can I add my custom translation dictionary (English-Polish) using dicutil? dictutil install dicthtml_en-pl.zip Polish is not supported by Kobo, so I don't know if it's possible with Your tool. If not, can I replace other dictionary (Portugeese for instance) by Polish ones and prevent them from syncing "oryginal" one? How? TIA |
![]() |
![]() |
![]() |
#8 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 895
Karma: 270670
Join Date: Jun 2016
Device: Kobo
|
Quote:
No, rename it, for example dicthtml_e1.zip |
|
![]() |
![]() |
![]() |
#9 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,800
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Semwize's answers are correct.
Quote:
__ P.S. Semwize: Thanks for all the help with testing dictutil (I'd give you karma, but I have to spread it around first)! |
|
![]() |
![]() |
![]() |
#10 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,800
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
I've decided against that one, as dictutil is not intended to be a general-purpose dictionary tool (that's what Penelope is for), and because the stardict format is too broad (there are 4+ different body text formats I would have to implement from scratch).
Quote:
It will support seamless decompilation of dictionaries generated by Penelope, Kobo (the unencrypted ones, if any), or dictgen (although it won't be able to recover the original Markdown or images, only the raw HTML). Dictionaries generated by other tools or manually created will also be able to decompiled, but it won't be able to automatically extract the header and generate the best dictfile. It will also be useful for fixing bugs with prefixes, variants, and missing words in existing dictionaries (just decompile and regenerate the dictfile). Another use will be merging dictionaries (just decompile it, and merge the resulting dictfiles). You will also be able to use it to convert stardict dictionaries by using Penelope to convert it to a dictzip, then this tool to decompile it to a dictfile, and then modify it from there. Last edited by geek1011; 03-06-2020 at 06:24 PM. |
|
![]() |
![]() |
![]() |
#11 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 77,956
Karma: 142032074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Will dictutil allow converting a Kindle format dictionary to a Kobo format dictionary?
|
![]() |
![]() |
![]() |
#12 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,800
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
No, as that would require implementing a MOBI parser and a whole lot more code. Besides, that's starting to get outside the scope of dictutil. You can use another tool to convert it to a usable format, then from there to a dictfile, though.
|
![]() |
![]() |
![]() |
#13 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,800
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
I've released v0.2.0 with a new dictzip-decompile tool. See the documentation for more information.
In addition, I've increased the maximum line buffer size for dictgen, which fixes compiling some large dictfiles with long lines of generated HTML. |
![]() |
![]() |
![]() |
#14 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 895
Karma: 270670
Join Date: Jun 2016
Device: Kobo
|
Here is what I will note. When creating Extra dictionaries with the help of Penelope, did not found (found, but no definition was given) in the dictionary phrases ('word word', 'word word word').
I creating the dictionary using dictutil and now everything is fine.Yes, it is superfluous in essence. Last edited by Semwize; 03-07-2020 at 06:13 AM. |
![]() |
![]() |
![]() |
#15 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,800
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Quote:
See here and here. |
|
![]() |
![]() |
![]() |
Tags |
dictgen, dicthtml, dictionaries, dictionary, dictutil |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Useful Related Tools Threads | BetterRed | Related Tools | 5 | 12-03-2024 05:01 AM |
Adding new dictionaries to kobo. | Robik | Kobo Developer's Corner | 61 | 12-19-2023 05:30 PM |
Mini Sync Problems on 3 different Kobo Minis (related to software update?) | jpottle | Kobo Reader | 2 | 06-20-2013 01:57 PM |
Copy/Move books between libraries using command line tools | jameszh | Library Management | 3 | 02-15-2011 10:02 AM |
MSD (BBeB dictionaries) tools ? | Papi | LRF | 0 | 12-20-2010 05:07 AM |