Sivotra is a vocabulary trainer that takes simple text files as input. It allows one to quickly select sets of vocabularies and to change this selection in a flexible way. It was programmed in C++. The graphical user interface was realized with the FLTK 1.1.7 toolkit, which handles all characters covered by ISO-8859-1 (Latin 1, Western Europe). There is also a command line (CLI) version, which might be useful if one wants to study languages that use other characters. The source code and ready-compiled executables (Linux i386) can be found in this archive:
| Source + Binaries (166 kiB) | MD5 sum |
|---|---|
| sivotra-0.1.tar.gz | 7699ad49e0fcc7f1625d7a8d80ab8ccc |
If you need further information, read on...
|
Foreword Binaries and Compilation The CLI Version Vocabulary Files Special Characters Bugs, Suggestions etc. |
This program was created, compiled and has been run on a "normal", "roughly up-to-date" (as of mid-2006) Linux desktop platform. The following information is biased towards similar systems, because this is what I use and know about. If you want to compile the program on a different platform, feel free to do so. I can't help you with that, however.
The easiest thing to do is, of course, to use the ready-compiled (Linux i386, gcc 4.0) binaries. There are three of them:
sivotra with a graphical user interface, dynamically
linked to the FLTK libraries (i.e. you need to have them)sivotra_static with a graphical user interface,
statically linked to the FLTK libraries (i.e. you don't need
to have them)sivotra_cli for the command line
If the binaries don't work, you can try compiling your preferred version
yourself. Go to the directory in which the Makefile
resides and enter
$ make clean
to delete the existing binaries.
$ make
will compile sivotra and
$ make sivotra_static
will compile the significantly larger but independent
sivotra_static. In both cases, you need the FLTK libraries.
Finally,
$ make sivotra_cli
will compile the CLI version. If you like the program, you may want to
copy the executable that works best for you to
~/bin/sivotra or /usr/bin/sivotra.
That's all there is to installation.
Actually, I have created the CLI version only for testing purposes. However, while most people certainly prefer the graphical version, the CLI version might be useful when character sets other than ISO-8859-1 are needed to display the vocabularies. Terminal emulators such as rxvt-unicode are capable of processing UTF-8 encoded text. If you run the CLI version in such a terminal, you may use all characters that can be entered and displayed there. More about the issue regarding character sets can be found in the section on special characters.
The CLI version passes so-called escape sequences to the terminal in
order to make it display colored text. Changing the colors or getting rid
of the escape sequences is quite simple, you just have to edit
sivotra_cli.cc. Quite at the top of that file, you find four
lines reading string col#="...". The escape sequences are
inside the quotes and may be changed to your liking. Don't forget to
recompile. The effect of different escape sequences can be conveniently
tested in a terminal—e.g. try
$ printf "\e[4;34;43munderlined blue over yellow\e[0m\n"
to get blue, underlined text on a yellow background in your terminal.
The structure of the vocabulary files is quite simple. They are supposed to be simple text files where each line contains a vocabulary and its translation in a second language, divided by a tabulator character (ASCII 09). They can easily be created with a text editor such as VIM, for which the following settings might be useful:
:set list :set noexpandtab :set tabstop=4 :set softtabstop=4
The first one makes tabs visible (they show up as
^I),
the second one allows you to actually enter tabs (rather than turn them
into a series of blanks) and the effect of the last two settings is that
you have to press the tab key just once to get a tab (it suffices if the
values of tabstop and softtabstop are equal).
It is also possible to create valid vocabulary files with spreadsheet
applications like
Gnumeric
(I've tried it). Just do a text
export with no quoting, character encoding Western (ISO-8859-1) and tab
as separator. A vocabulary file may contain an arbitrary number of comment
lines, each which must be preceded by a number sign or hash (#). If you
still cannot imagine what the files must look like, take a look at the
examples that come with the archive.
Words in foreign languages often contain "special" characters (e.g. accents above letters like in ò or umlauts like ü) that are not found in the English language. Unfortunately, different methods of storing (encoding) these characters in computers are in use. One of these is determined by the ISO-8859-1 (Latin 1) character map, which only needs one byte for every character and is suitable for languages spoken in Western Europe. Another such map is UTF-8, which covers thousands of different characters but, as a consequence, needs up to four bytes to encode non-US-ASCII characters (two bytes for those covered by ISO-8859-1). Anyway, the vocabulary files used with the graphical version of Sivotra must be encoded in ISO-8859-1, since the current version of FLTK only handles this character set. I understand that this is a serious constraint on a vocabulary trainer, but cannot help it. You can circumvent the problem by using the CLI version.
If a character is not directly available on your keyboard, you must use
the so-called Compose key. Usually, it is supposed to be Shift together
with the right Alt or Control key or something like that. I was unable to
find the default Compose key on my keyboard, but was successful at
specifying it in xorg.conf by putting an additional option
in the InputDevice section:
Section "InputDevice"
.
.
Option "XkbOptions" "compose:rwin"
.
EndSection
This way, I defined the right Windows key (which is otherwise not of much
use to me anyway) to be my Compose key. If you don't have root rights,
you may alternatively be able to define the Compose key with
xmodmap. Anyway, if you have found your Compose key, you
can type an
ò by first pressing
Compose, typing
` afterwards and then
o.
Or, if you want an
ä, you press first
Compose, type
" then and subsequently
a.
You get the idea. Curiously, on my laptop, I don't need a Compose key, as
some keys (e.g. `) always behave as if I have pressed Compose before it.
In order to get a simple `, I have to type ` (at which point the symbol
won't show up) and Space bar afterwards.
When creating a vocabulary file, you have to make sure that it is encoded in the "right way", i.e. ISO-8859-1 (Latin 1) unless you use the CLI version of. For example, if you create the file using the VIM text editor, you achieve this with the setting
:set encoding=latin1
(as opposed to utf-8). If you have a file encoded in UTF-8,
you can easily convert it to ISO-8859-1 on the command line with
iconv --from-code=UTF-8 --to-code=ISO-8859-1 from_file > to_file
This also works vice-versa in an obvious way.
The program has worked fine for me so far, but there might still be scenarios in which it does not behave correctly. I would appreciate it if you reported any such bugs to renari@arcor.de. Since it does everything that I want it to do, I probably won't conduct significant changes to the program, but you may offer suggestions anyway (just don't expect me to do anything). I would also appreciate it if you would contact me when you find errors—concerning facts or language—on this page. Please type the name of the program in the topic of your mail, as this reduces the likelihood that I will sort it out as spam.