Kyndloo

Adiel Mittmann
2008-10-04 19:08

About

Kyndloo looks up words in Kypros-Net’s excellent Greek–English and English–Greek dictionaries. It is a text-mode tool. A typical interaction looks like this:

$ kyndloo αγαπώ
αγαπώ
like, love

If a word has more than one meaning, all of them are retrieved and shown:

$ kyndloo βλέπω
βλέπω
behold, look, perceive, see, sight
βλέπω φευγαλέα
glimpse
βλεπω τα αξιοθέατα
do the sights
βλέπω την ζωή ρόδινη
see life through rose-coloured glasses

Words are cached in a local database for quicker retrieval. This local database can be dumped at any moment in a format readily understandable by programs such as Mnemosyne. The idea is this: words that you looked up, and that therefore are useful to you, are automatically stored and then later you can use a flash card program to help their memorization.

If a word is not found, you can manually enter a heading and a definition, which will then be stored in a separate local database:

$ kyndloo --ask προγραμματιστής
The word προγραμματιστής was not found!
Would you like to add a local definition for this word [y/N]?
y
Type in the word or idiom [προγραμματιστής]:

Type in the definition:
programmer
Entry added.
$ kyndloo --ask προγραμματιστής
προγραμματιστής
programmer

Download

Version 0.2

Source code package: kyndloo-0.2.tar.gz.

Install

Any modern Linux distribution should be able to compile and run Kyndloo without trouble. The prerequisites are:

Installation follows standard CMake practice:

$ mkdir build && cd build
$ cmake ..
$ make
# make install

Please note the last command should be run as root.

Usage

In order to look up one or more words, just type kyndloo followed by the words you want to look up:

$ kyndloo keyboard πληκτρολόγιο
keyboard
πλήκτρο, πλήκτρολόγιο, πλήκτρολογώ
πλήκτρολόγιο
keyboard

The available options are:

  • -d, --dump: dump words stored in cache. Headings are separated from definitions by a tab.
  • -e, --english: treat all words on the command line as English words. When dumping, this causes only English–Greek entries to be output.
  • -g, --greek: treat all words on the command line as Greek words. When dumping, this causes only Greek–English entries to be output.
  • -a, --ask: if a word is not found in Kypros-Net’s dictionary, ask the user (you) to input a headword and a definition, which will be locally stored. These manually input entries are also included in dumps (see -d option above).
  • -f, --force: even if a word wasn’t previously found, look it up again and honor the -a option, if it was specified.

Beware that the cache is stored in UTF-8 format, no matter what your current preferred locale is. This way, caches can be moved across different systems.

Bugs

I don’t know of any bug. Should you find any, please get in touch with me.

Details

Kyndloo is basically a Bash script. Kypros-Net does not offer a machine-friendly interface, so HTML is parsed with simple sed commands. The only piece not written in Bash is a little program, percent-encode, written in C++, which converts anything given to its standard input using the so-called percent-encoding mechanism.

License

Kyndloo is free software, licensed under GPL.

Kypros-Net

I believe this program does not violate Kypros-Net’s copyright notice. I am in no way distributing the contents of their dictionaries. Kyndloo solely provides a means to cache those results and to render them in a different manner.