Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Other formats

Notices

Reply
 
Thread Tools Search this Thread
Old 03-26-2014, 07:11 AM   #1
nikoski
Zealot
nikoski began at the beginning.
 
Posts: 105
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.
nikoski is offline   Reply With Quote
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,584
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
Old 03-27-2014, 07:36 AM   #3
nikoski
Zealot
nikoski began at the beginning.
 
Posts: 105
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.
nikoski is offline   Reply With Quote
Old 03-27-2014, 08:18 AM   #4
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,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by nikoski View Post
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.
Doitsu is offline   Reply With Quote
Old 03-27-2014, 12:04 PM   #5
nikoski
Zealot
nikoski began at the beginning.
 
Posts: 105
Karma: 10
Join Date: Feb 2014
Device: none
Quote:
Originally Posted by Doitsu View Post
...
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.
nikoski is offline   Reply With Quote
Old 03-27-2014, 12:38 PM   #6
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,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by nikoski View Post
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.)
Doitsu is offline   Reply With Quote
Old 03-27-2014, 12:45 PM   #7
nikoski
Zealot
nikoski began at the beginning.
 
Posts: 105
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?
nikoski is offline   Reply With Quote
Old 03-27-2014, 01:25 PM   #8
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,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by nikoski View Post
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:

Doitsu is offline   Reply With Quote
Old 03-28-2014, 02:04 PM   #9
nikoski
Zealot
nikoski began at the beginning.
 
Posts: 105
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 :-)
nikoski is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Generate Catalog: How to save as .txt file? allowingtoo Library Management 7 08-20-2013 03:01 PM
[Old Thread] Generate Cover from First Page of PDF File dp green Calibre 2 07-03-2012 03:53 AM
Generate Cover missing Chrysanthemum Calibre 1 01-13-2011 06:36 PM
pulling an entire website into Calibre and generate an epub file using news function? N13L5 Calibre 2 10-06-2010 09:00 PM
can't generate a toc from an html file p3aul Calibre 13 08-27-2010 05:44 AM


All times are GMT -4. The time now is 07:42 AM.


MobileRead.com is a privately owned, operated and funded community.