View Single Post
Old 03-27-2014, 04:42 AM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by nikoski View Post
I have some dictionaries consisting of 3 files: cdi, dict, idx. I use them on my android phone with the app "colordict".
These files might not be StarDict dictionaries, because many dictionary apps use the .dict extension for their data files.

Quote:
Originally Posted by nikoski View Post
I assume they do not work with GoldenDict because of the missing .IFO file.
GoldenDict does require an .ifo file. If your files are indeed StarDict files, you might be able to generate a new .ifo file with pyGlossary, if you have Python installed on your machine.
For this method, you'll need to create a dummy .ifo (plain text) file with the following information:

Code:
StarDict's dict ifo file
version=2.4.2
bookname=DICTIONARY_NAME
sametypesequence=h
Replace DICTIONARY_NAME with the name of your dictionary and save the .ifo file using the same name as the other two files. I.e., if you want to generate an .ifo file for en_de.dict you'll need to save the .ifo file as en_de.ifo. (Put .dict, .idx and .ifo files in the same folder.)

1. Download pyGlossary. (Unless you have a Mac or a Linux machine, you'll also need to install ActivePython or another Python distro, if you haven't already installed one.)
2. Unzip the archive with 7Zip.
3. Double-click pyglossary.bat to start pyGlossary.
4. Select StarDict (ifo) as input and output formats.
5. Click Browse, select the dummy .ifo file as the input file and click Load.
6. Select a different file name for the output .ifo file and click Convert.

If all went well, pyGlossary should have created a new .ifo file with the following lines added:

Code:
StarDict's dict ifo file
version=2.4.2
wordcount=XXXX
idxfilesize=XXXX
bookname=DICTIONARY_NAME
sametypesequence=h
bookname=DICTIONARY_NAME
Delete the redundant last line and you're done. (You'll obviously have to delete the dummy file and rename the file generated by pyGlossary.)
Doitsu is offline   Reply With Quote