Next Previous Contents

2. Installation, General Usage

2.1 How to obtain Kaptain

The primary web site for Kaptain is here. You can download the latest version, documentation and Kaptain grammars there.

2.2 Requirements

Kaptain is based on Qt 2.1 and KDE 2. However, it can be compiled without the KDE libraries.

2.3 Compilation and installation

In order to compile and install Kaptain on your system, type the following in the base directory of the Kaptain distribution:

% ./configure
% make
% make install

If you don't have kdelibs installed, run ./configure --disable-kde. This should work if the QTDIR variable points to the base Qt directory. (or specify qt directory for the configure script by adding the parameter --with-qt-dir=/usr/lib/qt2 or wherever you installed qt2)

Since Kaptain uses autoconf you should have not trouble compiling it. Should you run into problems please report them to the the author Terék Zsolt

2.4 Bugs

if you have found some bugs in kaptain, please send me the grammar script which caused the error. Thanks.

2.5 General Usage

Kaptain must read the grammar to show up the dialog. You can either specify the file containing grammatical rules or write it to the standard input. For example

% kaptain example.kaptain

On the other hand, if the Kaptain grammar example contains the comment

#!/usr/bin/kaptain
on the first line, and is executable, you simply type example at the prompt.

If the first parameter is --test or -t,the program won't execute the generated command, just write it to the standard output. It is useful for test purpuses for grammar writers.

Another flag is --verbose or -V, and it makes kaptain print out every rule it reads. You can check where the parser failed, if the grammar contains errors.

If no input files are specified, Kaptain reads the grammar from the standard input.

An other way to use kaptain is to start /usr/bin/kaptainshell, which shows up the grammars located in /usr/share/grammars and the user can choose from that list. Kaptainshell itself is a simple kaptain grammar script (in 241 bytes).


Next Previous Contents