dictcmd - an simple german <-> english dictionary for your commandline
This program is for german - english and english - german translation direct form your comandline. There are two eventual sources to get your translation. The first one is an simple file in your directory, the second one is to make an online request to a known dictonary service. You can choose which kind of source you ask. Only online, only offline or both (default). If you ask both and your perl version has ithreads enabled you get better performance by using multithreading.
dictcmd <OPTION> <SEARCHITEM>
-de2en
-de the given word is a german one and you want to search the english equivalent.
-en2de
-en the given word is a english one and you want to search the german equivalent.
-online use only online search
-offline use only offline search in the en-de.ISO-8859-1.vok file
$ perl Makefile.PL
$ make
$ make test
$ make install
If you want to use the online search too, you need to install a CPAN Module.: WWW::Dict::Leo::Org http://search.cpan.org/~tlinden/WWW-Dict-Leo-Org-1.35/Org.pm If you use cpanm type: $ cpanm WWW::Dict::Leo::Org
If you not use cpanm ... you should!
If you want to use online and offline ressources together it is possible to use this with multithread support. To use interpreterthreads in perl you must compile them into your perl version. To check if they already compiled in type:
$ perl -V | grep ithreads
$ #or
$ perl -le 'use Config;$Config{'useithreads'}?print"threads":print"no threads"'
To Compile them in, you must define the thread macro at configure time with:
$ sh Configure -Dusethreads
Note: This little programm runs also fine without threads or online modules!
- Output options controllable with confiugration file
- Support for other online dictionary services
- Refactore the package structure
- writing additional tests to provide better stability
- adding the difference from online and offline output to the file