Register Guidelines E-Books Search Today's Posts Mark Forums Read

 MobileRead Forums StarDict: .IFO file missing. How to create/generate one?

 03-26-2014, 07:11 AM #1 nikoski Connoisseur   Posts: 80 Karma: 10 Join Date: Feb 2014 Device: none [solved] StarDict: .IFO file missing. How to create/generate one? EDIT: issue solved thanks to Doitsu's hint! I have some dictionaries consisting of 3 files: cdi, dict, idx. I use them on my android phone with the app "colordict". I assume they do not work with GoldenDict because of the missing .IFO file. They do not get added to Goldendict. How could i generate the necessary "IFO" or otherwise make them working? Last edited by nikoski; 03-27-2014 at 12:08 PM.
03-27-2014, 04:42 AM   #2
Doitsu
Wizard

Posts: 3,319
Karma: 7648426
Join Date: Dec 2010
Device: Kindle PW2
Quote:
 Originally Posted by nikoski 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 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.)

 03-27-2014, 07:36 AM #3 nikoski Connoisseur   Posts: 80 Karma: 10 Join Date: Feb 2014 Device: none Thanks, Doitsu, i appreciate very much your help. But "pyGlossary.bat" does not start the GUI on my windows 8.1-x64. When i double-click on it there comes the standard dialog to select an aplication with which pyGlossary.bat should be opened. When i run it as Admin there comes another dialog saying: "src/pyglossary.pyw can not be found." But this file is there. I also tried all the versions 2.7 and 3.3 (x86 and x64) of the ActivePYthon. What could it be that prevents the GUI from starting? Last edited by nikoski; 03-27-2014 at 08:09 AM.
03-27-2014, 08:18 AM   #4
Doitsu
Wizard

Posts: 3,319
Karma: 7648426
Join Date: Dec 2010
Device: Kindle PW2
Quote:
 Originally Posted by nikoski But "pyGlossary.bat" does not start the GUI on my windows 8.1-x64. When i double-click on it there comes the standard dialog to select an aplication with which pyGlossary.bat should be opened.
Did you extract all folders and files from the pyglossary-2010.10.03.tar.gz file? You should end up with a pyglossary-2010.10.03 folder and several subfolders in it.

Instead of executing the .bat file, you can also double-click pyglossary.pyw in the \pyglossary-2010.10.03\src folder. If you don't see pyglossary.pyw (and several other files) in this folder or if it doesn't have the yellow and blue ActivePython icon, either your Python installation or folder extraction failed. (Both work fine on my x64 Win 8 machine.)

Alternatively, you could also first try to simply copy the dummy .ifo file with the dictionary name to the GoldenDict content folder, because GoldenDict might not need the wordcount and idxfilesize entries.

03-27-2014, 12:04 PM   #5
nikoski
Connoisseur

Posts: 80
Karma: 10
Join Date: Feb 2014
Device: none
Quote:
 Originally Posted by Doitsu ... Alternatively, you could also first try to simply copy the dummy .ifo file with the dictionary name to the GoldenDict content folder, because GoldenDict might not need the wordcount and idxfilesize entries.
Yes, it seems it does not need those values, so that the dictionaries seem to work ok with only a "dummy .IFO" Problem solved, thanks a lot for your invaluable help!

But strange that the pyGlossary won't work on my PC
I've extracted all for sure and have all the files in the incl. "pyglossary.pyw" and there are several with ActivePython icon:
Quote:
 C:\Python\pyglossary-2010.10.03\src\glade C:\Python\pyglossary-2010.10.03\src\lib-src C:\Python\pyglossary-2010.10.03\src\alchemy.py C:\Python\pyglossary-2010.10.03\src\bgl.py C:\Python\pyglossary-2010.10.03\src\clean C:\Python\pyglossary-2010.10.03\src\exir.py C:\Python\pyglossary-2010.10.03\src\glossary.py C:\Python\pyglossary-2010.10.03\src\glossary_direct.py C:\Python\pyglossary-2010.10.03\src\help C:\Python\pyglossary-2010.10.03\src\interface_gtk.direct_py C:\Python\pyglossary-2010.10.03\src\mimapps.list C:\Python\pyglossary-2010.10.03\src\pmd-font-edited.png C:\Python\pyglossary-2010.10.03\src\progressbar.py C:\Python\pyglossary-2010.10.03\src\pyglossary.ico C:\Python\pyglossary-2010.10.03\src\pyglossary.png C:\Python\pyglossary-2010.10.03\src\pyglossary.pyw C:\Python\pyglossary-2010.10.03\src\pyglossary.xbm C:\Python\pyglossary-2010.10.03\src\pyglossary_gregorian.py C:\Python\pyglossary-2010.10.03\src\rc.py C:\Python\pyglossary-2010.10.03\src\sdict.py C:\Python\pyglossary-2010.10.03\src\text_utils.py C:\Python\pyglossary-2010.10.03\src\ui_cmd.py C:\Python\pyglossary-2010.10.03\src\ui_gtk.py C:\Python\pyglossary-2010.10.03\src\ui_gtk_noglade.py C:\Python\pyglossary-2010.10.03\src\ui_qt.py C:\Python\pyglossary-2010.10.03\src\ui_tk.py
When rightlicking pyglossary.bat and running it as admin i get an error as well that the file "scr\pyglossary.pyw" could not be found.

Last edited by nikoski; 03-28-2014 at 02:16 PM.

03-27-2014, 12:38 PM   #6
Doitsu
Wizard

Posts: 3,319
Karma: 7648426
Join Date: Dec 2010
Device: Kindle PW2
Quote:
 Originally Posted by nikoski When rightlicking pyglossary.bat and running it as admin i get an error as well that the file "scr\pyglossary.oyw" could not be found.
That's indeed very strange. I don't have this file in my folder either, but pyGlossary runs fine. Did you by any chance install Python 3?

If so this might be the cause of the problem, because Python 3 introduced some syntax changes that can cause errors when running Python scripts not designed for Python 3. Since many other Python scripts for ebook/dictionary conversion etc. expect Python 2.7, you may want to uninstall Python 3 unless you need this specific version for other Python scripts.
(You can display the Python version number by entering python at a command prompt.)

 03-27-2014, 12:45 PM #7 nikoski Connoisseur   Posts: 80 Karma: 10 Join Date: Feb 2014 Device: none I first installed python 3 but uninstalled it and now i have python 2.7 but the error remains the same. How does the GUI of the pyglossary actually look? Do you maybe have a link on the internet to see how it looks when started?
03-27-2014, 01:25 PM   #8
Doitsu
Wizard

Posts: 3,319
Karma: 7648426
Join Date: Dec 2010
Device: Kindle PW2
Quote:
 Originally Posted by nikoski How does the GUI of the pyglossary actually look? Do you maybe have a link on the internet to see how it looks when started?
It looks like this:

 03-28-2014, 02:04 PM #9 nikoski Connoisseur   Posts: 80 Karma: 10 Join Date: Feb 2014 Device: none Ok, i see, thank a lot once more! Because the issue about the missing IFO file is now solved, for the time being i'm not going to try to get that script to work on my PC any more, but at least i know now how it should look when working correctly :-)