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: 'dictd_www.freedict.de_gcide.dict.dz' 'dictd_www.freedict.de_gcide.idx.gz' and also prints out: 'wordcount: 176957'. And then we need to create a new file called: 'dictd_www.freedict.de_gcide.dict.ifo' with following content: ---- StarDict's dict ifo file version=2.4.2 wordcount=176957 idxfilesize=3370280 bookname=gcide description=gcide date=2006.9.4 sametypesequence=m ---- (Where the value of idxfilesize is the uncompressed size of 'dictd_www.freedict.de_gcide.idx.gz'.) To make stardict to load the dictionary automatically, create a directory called: /usr/share/stardict/dic/dictd_www.freedict.de_gcide/ 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, -- PaulLiu(劉穎駿) E-mail address: [EMAIL PROTECTED]
signature.asc
Description: OpenPGP digital signature