ilius / pyglossary

A tool for converting dictionary files aka glossaries. Mainly to help use our offline glossaries in any Open Source dictionary we like on any modern operating system / device.
GNU General Public License v3.0
2.25k stars 237 forks source link

Support reading Pleco user dictionaries #584

Open huannv100 opened 2 months ago

huannv100 commented 2 months ago

Could Pleco user dictionaries be supported as well? I have found many good Chinese dictionaries that are not currently supported. It would be great to be able to convert them to Yomichan. This is an example of some Pleco user dictionaries. https://www.plecoforums.com/threads/new-chinese-radical-dictionaries.7310/#post-53071

ilius commented 2 months ago

Are you referring to the Radical Name Dictionary (RAN) file? Is that a known or common format? Where is the web page for the format itself?

huannv100 commented 2 months ago

Hi, The Radical Name Dictionary is one example of a Pleco user dictionary that I would like to convert for use in Pleco. The format is as follows:

<<Simplified>>[<<Traditional>>]<tab>pinyin<tab>definition<newline>.

I believe this is the standard format for all Pleco user dictionaries.

Here are some links that discuss Pleco user dictionaries. Mikelove and Shun, the creators of Pleco, have contributed to these discussions: User dictionaries: creation, import, file format, etc. Custom dictionary documentation

ilius commented 2 months ago

The Radical Name Dictionary (RAN) file is a SQLite db, not plain text file.

Can you attach one glossary example you are referring to? Try to open it with a text editor first.

huannv100 commented 2 months ago

Hi, Here is an example of "char_v1.0.txt" and "char_v1.0.pqb". https://github.com/catusf/tudien/releases/tag/V2.6 When I import user dictionaries into Pleco, I can use both the .txt and .db files. If I import the .txt file, it will be converted into a .db file as well.