New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dict: OPTION MIME Support #947
Comments
This is an excellent idea. I am building my own My current workaround is to add a "Program" entry in GoldenDict, using |
I am very glad that I met someone likeminded. I also went that way. I want to now bring up those flaws which make themselves known when directly using dict as an external program. How to reproduce the problem Start up GoldenDict.
Check the "Enabled" option and click OK. The core of the problem:
In order to solve all of these problems an intermediate script must be created which will run dict and will as a result format in the needed way. I created such a script in the JScript language. Look at the screen captures with these wort definitions: See screen capture 3 How to install Run the self-extracting archive dict1.12.1.exe.
Check the "Enabled" option and click OK. The flaw could be considered that which is calculated only for users with Windows, installer is intended only for russian language users, and the setup process itself, in my opinion, has turned out to be quite difficult. |
Since a lot of time has passed and something has changed, I want to add additional information to the issue.
And the server replies with
Subsequent responses to DEFINE commands include the content-type/content-encoding headers. |
I accidentally found that starting with version 1.5.0-RC2-359-g9bae6d2 this problem has been resolved. One could close this issue, but after testing I saw one very serious problem. I want to make a report on this now. In dictserver.cc, at lines 840-921, we see a solution to the problem referred to in the topic However, now that support the OPTION MIME is implemented, this part of the code should be executed provided that there is no MIME header, such as this:
If a similar header is received from a dictionary, then this part of the code should not be executed. Use the dict.bible.ru server for the test. For example, a search for the word "Давид" will open the definition from V.P. Vikhlyantsev's Bible Dictionary with the translation of this name, a short history of King David and passage references. In the screen capture we can see that the four Bible references look like hyperlinks. However, they must appear to be enclosed in curly brackets ({ }). {See Давид} |
Just for reference:
|
Actually, replacing of refs ( Lines 836 to 837 in c6f8d29
|
Hi, I am using Mobidict to consult Kindle dictionaries on my desktop. I believe that is much easier then converting the mobi files. However, I would like to load the Mobidict search results into GoldenDict. Would you know how to do this? |
The DICT-server can give MIME content, i.e. give arbitrary content without restrictions with reference to their type. If the DICT-client is able to receive a MIME content, it shall send the OPTION MIME command to the DICT-server (see dict -M). In this case, the DICT-client goes to processing task of the content. dictd, in turn, can give Plain Text or MIME content depending on whether if the client gave the OPTION MIME command to him. See A Dictionary Server Protocol. So, DICT-dictionary can consist of two modules: one with PlainText content, and other with a MIME content. In the file /usr/share/doc/dictd/examples/dictd_mime.conf we can find for example how to set up the configuration file /etc/dictd/dictd.conf in order to DICT-server will able properly to process the OPTION MIME command.
The GoldenDict doesn't support the OPTION MIME for the dictionaries which are given in the "Edit > Dictionaries > Sources > DICT servers" menu, in this way all dictionaries installed in the "DICT servers" tab can be only with Plain Text content.
I express my desire about working out such a support. For testing MIME-heading I can suggest DICT-server: dict.bibleonline.ru; dictionaries:
These dictionaries have the following MIME-heading:
In answer to the OPTION MIME command DICT-server may give arbitrary content without limit by indicating its type. DICT-client may not expect such content which will be given to him. In this case I will consider in the quality of the DICT-client the program GoldenDict. The task is included so that GoldenDict would give an error message in such a case if it receives such a MIME heading which it is not yet able to support. Sample message text: "The dictionary entry contains a MIME heading that is not supported in GoldenDict." Further, as a need appears a list of supported MIME headings can be expanded for the user.
The text was updated successfully, but these errors were encountered: