You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently gdcl uses gdcg.rb to prepare custom groups of dictionaries for searching. Ideally, gdcl should look in the GoldenDict home folder and read the preferences in the GoldenDict config file so that we can use groups that have already been set up by the user.
The config file is relatively simple and the groups are arranged under <group> tags, e.g.:
<group id="1" name="zh">
followed by a list of dictionaries between dictionary tags, e.g.:
The only problem is that, as seen in the example above, the dictionaries are listed by their index hash rather than file name or location. So to get the file location we need to first read the preferences folder to discover the group name, and then get the location and other information from the index file.
Unfortunately, the index file is encoded, so we need to decode the file to read the location information. It is not immediately obvious how to do that, but someone more familiar with the GoldenDict source code might be able to help.
The text was updated successfully, but these errors were encountered:
Currently gdcl uses
gdcg.rb
to prepare custom groups of dictionaries for searching. Ideally, gdcl should look in the GoldenDict home folder and read the preferences in the GoldenDict config file so that we can use groups that have already been set up by the user.The config file is relatively simple and the groups are arranged under
<group>
tags, e.g.:followed by a list of dictionaries between
dictionary
tags, e.g.:The only problem is that, as seen in the example above, the dictionaries are listed by their index hash rather than file name or location. So to get the file location we need to first read the preferences folder to discover the group name, and then get the location and other information from the index file.
Unfortunately, the index file is encoded, so we need to decode the file to read the location information. It is not immediately obvious how to do that, but someone more familiar with the GoldenDict source code might be able to help.
The text was updated successfully, but these errors were encountered: