How to convert stardict dictionary file format to any readable format?

7

6

How to convert stardict dictionary file format to any readable format (xml, txt or something)?

Astronavigator

Posted 2010-05-03T00:11:46.417

Reputation: 171

Answers

3

The stardict-tools tarball downloadable from their website has a stardict2txt tool that you'll need to build from source.

Ignacio Vazquez-Abrams

Posted 2010-05-03T00:11:46.417

Reputation: 100 516

You can now install the tools by sudo apt-get install stardict-tools in Ubuntu. The tools are at /usr/lib/stardict-tools/ – Raptor – 2016-11-14T04:00:10.243

It's almost impossible to compile though. I tried on FreeBSD, OS X, and finally Ubuntu. After numerous fixes to the code, I got it to compile but it segfaults when you run it. – Gazzer – 2010-09-02T04:29:36.537

2

Your can use this:

https://github.com/ilius/pyglossary

If your need install it for user on linux your can create virtualenv and acrivate it

  git clone https://github.com/ilius/pyglossary.git
  cd pyglossary
  #1. Add to setup.py after:
  #import logging
  #next line:
  #logging.basicConfig()
  #
  #1. change in setup.py 
  #from pyglossary.glossary import VERSION to
  #VERSION = "3.1.0" # version that was tested in my case
  python setup.py
  pyglossary

And converter will be running, that your can doing different conversions.

Other way:

There is file .dict.dz.

  1. Emacs open it as text file, then you can copy text and place it to some file.
  2. execute:

    dictunzip <dictname>.dict.dz

To convert it to .dict file, and read as text file. Program dictunzip is in package dictzip (debian, ubuntu). In my case .dict was readable, may be in some cases it is binary.

Some

Posted 2010-05-03T00:11:46.417

Reputation: 21

1

I found this step by step guide on how to use the StarDict editor for Windows in order to decompile a StarDict dictionary to XML format.

  • Extract all files to a folder and then launch the file stardict-editor.exe, switch to the tab DeCompile.
  • Now look at the dictionary files of StarDict you got, there should be 3 files : *.idx, *.ifo, *.dz.
  • Rename the *.dz file to *.gz. Use WinZip or WinRAR to extract the *.dict file inside.
  • Rename all the *.dict, *.ifo, *.idx files to a same name.
  • Back to the StarDict Editor program, click Browse and select the *.ifo file and hit Decompile.
  • You will see a new *.txt file inside the folder.
  • Use it with DfM DictionaryGeneration.

Michal Yashpe

Posted 2010-05-03T00:11:46.417

Reputation: 11