|
|
Thread Tools | Search this Thread |
05-21-2020, 08:14 PM | #76 |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
|
05-22-2020, 10:17 AM | #77 |
Zealot
Posts: 138
Karma: 4260
Join Date: Jan 2011
Device: none
|
|
05-22-2020, 10:58 PM | #78 | |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
|
|
05-23-2020, 12:07 AM | #79 |
Zealot
Posts: 138
Karma: 4260
Join Date: Jan 2011
Device: none
|
Hahaha, ok, thanks for the explanation.
Cheers. Admin/Mods: Feel free to delete my posts to clean up the thread. Thx. |
06-21-2020, 04:01 PM | #80 |
Connoisseur
Posts: 76
Karma: 10742
Join Date: Jul 2017
Location: Serbia
Device: Kobo Aura One
|
I've been trying to get back to making some dictionaries after a long time, and I'm more than slightly confused by all these new tools. Previously I think I used a combination of makedict (which I can no longer find?) and/or Penelope, and had success converting dictionaries that I still use. Some were StarDict, but some were converted through at least one more format before I was able to get them Kobo-ready.
Anyway, there are newer dictionaries I'd like to try out, mostly in .dsl and .mdx formats, and I'd hoped these new tools would help me along. So I started from scratch and set up PyGlossary and dictutil, with the intention of using the glossary to convert my source files to some cleaner format, and then using dictutil to do the rest. Despite all my efforts, I was not able to make a successful conversion once with these new tools, so I must be doing something wrong. During the course of my research, i realised that there are different versions of .mdx, and that revision 3 is not really convertable, so I ditched the format for the time being and focused on dsl. Using the default PyGlossary options to convert my dictionaries to Kobo format did not result in a readable dictionary. So I guess my first question would be - to what format do I need to convert a .dsl dictionary for best results with dictutils? |
06-21-2020, 07:35 PM | #81 | |
Wizard
Posts: 2,735
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Quote:
Otherwise, if you have multiple headwords, I'd suggest converting it to a plain-text format (like the Babylon text one or CSV) and using a text editor with regexp and multi-cursor support to transform it into a dictfile, then use dictgen on it. If you do use the Babylon format, there's a converter on the dictutil site. If you also need images, I'd suggest writing a custom script to do it (or give me an example of what a word looks like, and I'll see what I can do). |
|
06-22-2020, 09:31 AM | #83 |
Connoisseur
Posts: 76
Karma: 10742
Join Date: Jul 2017
Location: Serbia
Device: Kobo Aura One
|
Thank you both very much! Now I know that I'm doing something wrong!
First, I tried to convert a .dsl file into a StarDict file and then use Penelope, which produced an invalid Kobo dictionary, and compile/recompile with dictutil didn't help. Then I tried an old StarDict file I had and used Penelope again, and that worked. When I tried that same StarDict dictionary and used PyGlossary directly to get a Kobo dictionary, I got a write error: Spoiler:
I understand that Kobo is a fresh addition to PyGlossary version 3.3, so it could just be that the kinks haven't yet been worked out. Finally, I tried makedict (thank you Semwize!) to convert a .dsl to StarDict and used Penelope to get to Kobo, which worked. Decompile and compile with dictutil worked also. (Btw, are there any recommended parameters for compile/recompile of Penelope dictionaries? While I was testing, I just used drag and drop. I suppose that my old conversions would benefit from a dictutil pass-through, so if it's simple enough I might just go through them all.) I have yet to try and tinker with Babylon or any other features that depend on PyGlossary. I was able to find a different tool that extracts the content from .mdx files and exports it directly to a .txt file, but one look into the file tells me that removing all the stylesheet references, internal links, span tags and the like is going to be a huge pain. Still, it seems to be the best option for .mdx files to date, if I can only streamline the process of cleaning up the file so that dictutil can read it. (I'd appreciate any tips on that.) Bottom line is, PyGlossary seems to be the point of error for me, as it somehow corrupts the StarDict version and that poisons the rest of the chain. The thing is, there are no errors during the conversion process from .dsl to StarDict, as far as I can see, but if one thing isn't working, it stands to reason that others might not work either. I can't seem to pinpoint what I'm doing wrong. I'd certainly like to get PyGlossary working since most people consider it to be the norm, if nothing else than to try and extract some .mdx data from it and see if it's any easier than the method I've found. |
06-22-2020, 10:24 AM | #84 |
Guru
Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
|
Who consider this the norm)) I then edit the code manually (with regular expressions, as geek1011 advised above), because I don’t like what PyGlossary creates (indentation, etc.). Just makedict is really out of date.
|
06-22-2020, 04:07 PM | #85 | ||
Wizard
Posts: 2,735
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Quote:
If there's enough interest, though, I might make a dictfile output for PyGlossary, which can then be used with dictutil. Quote:
|
||
06-22-2020, 11:21 PM | #86 |
Guru
Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
|
geek1011, stardict. I once tried to convince you that we, with Cyril and Methodius quite a lot, you did not believe
Last edited by Semwize; 06-22-2020 at 11:26 PM. |
06-24-2020, 02:11 PM | #87 | |
Connoisseur
Posts: 76
Karma: 10742
Join Date: Jul 2017
Location: Serbia
Device: Kobo Aura One
|
Quote:
However, makedict with Penelope still works as it should, and your tool also has tremendous value. Keeping with my standard conversion steps (dsl to stardict to kobo), I was able to make some tweaks thanks to the decompiler, and improve the overall readability of my conversions. I'm still battling with multiple blockquotes and ways to disentangle them, and learning how to use regex replacement features, but I can already see what a difference it can make! I did encounter an interesting issue that I presume has to do with Kobo rather than my dictionaries. Many glyphs used in English phonetic transcription seem to be missing? Is this an encoding error or are they actually missing from the default font? (For example, "o͞o" is rendered as two o's with a block above them.) |
|
06-24-2020, 02:28 PM | #88 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Which font is "better" will vary depending on those dictionaries. Currently there are 2 workarounds:
ETA: In case it helps, the char you quoted, "o͞o", is present in Arial. This is what I use in for my dictionary widgets using option 1. above. Last edited by jackie_w; 06-24-2020 at 02:35 PM. Reason: ETA |
|
06-24-2020, 05:11 PM | #89 | |
Connoisseur
Posts: 76
Karma: 10742
Join Date: Jul 2017
Location: Serbia
Device: Kobo Aura One
|
Quote:
|
|
06-27-2020, 01:02 AM | #90 |
Wizard
Posts: 2,841
Karma: 22003124
Join Date: Aug 2014
Device: Kobo Forma, Kobo Sage, Kobo Libra 2
|
Ok, running firmeware 4.22.15190 the trick of setting the dictionary files to read only does not seem to work.
At least on my Forma a sync is replacing them with the ones they're meant to stand in for. Specifically "dicthtml-fr-en" and the "dicthtml" (which for me is english, but this is how it's displayed on the Kobo). I've tried setting it to read only on both Windows 10 and OS X Catalina. Both respect the others settings for this so I know it's being properly preserved by Kobo. But once I sync the files are replaced. edit to add, I've also tried, in terminal, chmod 444 on the files in question and the dict folder itself. Same result as above the files are replaced. I'm not sure if this change also affects this tool, as quite honestly I've no idea how to use it. But I presume it does as I'm guessing it's just setting the dicthtml files to read only. Any thoughts? Last edited by MGlitch; 06-27-2020 at 01:18 AM. |
Tags |
dictgen, dicthtml, dictionaries, dictionary, dictutil |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding new dictionaries to kobo. | Robik | Kobo Developer's Corner | 61 | 12-19-2023 04:30 PM |
Useful Related Tools Threads | BetterRed | Related Tools | 4 | 01-28-2022 05:03 PM |
Mini Sync Problems on 3 different Kobo Minis (related to software update?) | jpottle | Kobo Reader | 2 | 06-20-2013 12:57 PM |
Copy/Move books between libraries using command line tools | jameszh | Library Management | 3 | 02-15-2011 09:02 AM |
MSD (BBeB dictionaries) tools ? | Papi | LRF | 0 | 12-20-2010 04:07 AM |