[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

make dictionary packages support stardict

Dear dictionary maintainers and other developers,

Stardict is a dictionary reader, it provides 'scan selection word'
function which gives the translations in a pop-up window immediately.
Because it needs pop-up a search result immediately, the DICT protocol
cannot be satisfied. So it uses its own binary dictionary format instead.

Currently we have gtk, gnome and console version of stardict in the
archive, and the stardict-dictionary virtual package, but none of the
dictionary packages supports it.

To provide dictionary data for stardict, we can convert the original
DICT dictionary packages to stardict's binary format. And we are so
lucky that the upstream of stardict already provides some tools in
stardict-tools for this task.

Here is a basic conversion example:

cp /usr/share/dictd/gcide.dict.dz .
cp /usr/share/dictd/gcide.index .
dictunzip gcide.dict.dz
/usr/lib/stardict/dictd2dic gcide

It generates two files:
and also prints out:
'wordcount: 176957'.

And then we need to create a new file called:
with following content:
StarDict's dict ifo file
(Where the value of idxfilesize is the uncompressed size of

To make stardict to load the dictionary automatically, create a
directory called:
and then put these three files into that directory.
Conversion is done!

Now we all known the conversion isn't that difficult, but we need to
think about how to make all dict packages doing the same thing. There
are several ways that we can do:

1) Build a stardict binary package from the original source package, eg:
dict-gcide (source package)  --+---> dict-gcide
Build-depends: stardict-tools  |
                               +---> stardict-gcide

2) Use debconf script to ask users and convert the data by postinst, eg:
dict-gcide (source package)  ---> dict-gcide (with debconf/postinst)
Depends: stardict-tools

3) Create another new source package, eg:
stardict-gcide (source package)  ---> stardict-gcide
Build-depends: stardict-tools, dict-gcide

Thanks for reading my email, and please give me some comments.

Best regards,

E-mail address: grandpaul@gmail.com

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: