--- kaptain-0.72.orig/doc/kaptain.info
+++ kaptain-0.72/doc/kaptain.info
@@ -1,6 +1,11 @@
-This is kaptain.info, produced by makeinfo version 4.1 from
+This is kaptain.info, produced by makeinfo version 4.8 from
kaptain.texi.
+INFO-DIR-SECTION Utilities
+START-INFO-DIR-ENTRY
+* Kaptain: (kaptain). Universal graphical front-end.
+END-INFO-DIR-ENTRY
+
This is a manual for Kaptain, the Universal Graphical Front-end.
Copyright (C) 2000-2004 Zsolt Tere'k
@@ -23,11 +28,11 @@
File: kaptain.info, Node: The Concepts of Kaptain, Next: Invoking Kaptain, Prev: Top, Up: Top
-The Concepts of Kaptain
-***********************
+1 The Concepts of Kaptain
+*************************
- Kaptain is a universal graphical front-end. It was originally
-developed in order to provide a simple and efficient tool for creating
+Kaptain is a universal graphical front-end. It was originally developed
+in order to provide a simple and efficient tool for creating
dialog-based interface for command line programs. Now, its communication
features allow it to serve the graphical user interface of a program
without directly using a graphical library, such as GTK or Qt.
@@ -36,12 +41,12 @@
is a text file, which contains a description in a form of a context-free
grammar and optionally some other instructions. This manual refers to
the input file of Kaptain as a _grammar script._ See *Note Grammar
-Scripts:: for a complete overview on grammar script syntax.
+Scripts:: for a complete overview on grammar script syntax.
According to the grammar script, Kaptain builds a _graphical dialog
box_. Certain parts of the dialog box are associated with certain
elements of the grammar. This association is quite natural, thats why
-Kaptain's language is so easy to learn.
+Kaptain's language is so easy to learn.
In the dialog box, several widgets are present. These objects can be
manipulated by the user--text can be entered into input fields,
@@ -55,10 +60,8 @@
modes. For its first mode, an integer parameter should be given, and the
second mode needs some text as parameter. An example for starting
`prog' in its first mode:
-
-and in second mode
-
-Kaptain is a perfect tool for creating a graphical front-end for this
+ and in second mode
+ Kaptain is a perfect tool for creating a graphical front-end for this
program. First of all, we need to describe the possible command lines
with a grammar.
start -> "prog " parameter ;
@@ -82,11 +85,11 @@
File: kaptain.info, Node: Invoking Kaptain, Next: Grammar Scripts, Prev: The Concepts of Kaptain, Up: Top
-Invoking Kaptain
-****************
+2 Invoking Kaptain
+******************
- Kaptain needs a grammar script in order to display the dialog. This
-is usually located in a file, and the name of that file is passed to
+Kaptain needs a grammar script in order to display the dialog. This is
+usually located in a file, and the name of that file is passed to
Kaptain as an argument. The grammar script can be written to the
standart input of Kaptain, too.
@@ -96,10 +99,10 @@
The command line of Kaptain generally looks like this:
Kaptain [options] FILE
- If the FILE is omitted, the standard input is used as a source for
+ If the FILE is omitted, the standard input is used as a source for
the input file.
-Some options are used to specify running mode, while others set up
+ Some options are used to specify running mode, while others set up
different kinds of communication channels for external control. Kaptain
accepts the following switches and parameters:
`--version'
@@ -147,16 +150,17 @@
If this flag is set, Kaptain will not send any messages on its
output channel.
+
These are the possible parameters and options accepted by Kaptain
called from the command prompt.
File: kaptain.info, Node: Grammar Scripts, Next: Examples, Prev: Invoking Kaptain, Up: Top
-Grammar Scripts
-***************
+3 Grammar Scripts
+*****************
- The input file of Kaptain is a grammar script. It contains the
+The input file of Kaptain is a grammar script. It contains the
description of a context-free grammar in a form of rules. Beside the
rules, it might also contain so-called descriptions and constraints.
@@ -164,7 +168,7 @@
comment character, which means that all characters after the hashmark up
to the end of the line are ignored together with the hashmark. This is
not true if the hashmark appears inside a quoted string, see *Note
-Quotations::.
+Quotations::.
* Menu:
@@ -177,10 +181,10 @@
File: kaptain.info, Node: Grammars, Next: Special symbols, Prev: Grammar Scripts, Up: Grammar Scripts
-Grammars
-========
+3.1 Grammars
+============
- The program Kaptain reads an input file containing the description in
+The program Kaptain reads an input file containing the description in
the form of a context-free grammar. The concept of context-free grammar
is coming form formal linguistic. A grammar is built up of several
rules. Each rule contains a left hand side symbol and some symbols on
@@ -194,10 +198,10 @@
Nonterminal symbols are similar to variables in other programming
languages. Their name can contain alphanumeric characters and
-underscore, and should not begin with numbers.
+underscore, and should not begin with numbers.
Terminal symbols are written between quotation marks. Kaptain has
-many ways for specifying terminal symbols, see *Note Quotations::
+many ways for specifying terminal symbols, see *Note Quotations::
The text generation process is an iterated application of rules on
the current sentence. Starting from the nonterminal symbol `start',
@@ -205,7 +209,7 @@
nonterminal symbol in the current sentence--which is the left hand side
of the applied rule--is replaced by the symbols on right hand side of
the rule. This process ends if there are no more nonterminal symbols in
-the current sentence.
+the current sentence.
To illustrate text generation, let us have the following grammar:
start -> "Your " animal "is " size ;
@@ -234,7 +238,7 @@
The set of sentences that can be generated using a certain grammar is
called the _language_ generated by that grammar. _Formal languages_ is
-a branch of mathematics that deals with languages and grammars.
+a branch of mathematics that deals with languages and grammars.
* Menu:
@@ -243,10 +247,10 @@
File: kaptain.info, Node: Special symbols, Next: Quotations, Prev: Grammars, Up: Grammar Scripts
-Special symbols
-===============
+3.2 Special symbols
+===================
- The expression power of grammars is great. However, sometimes it is
+The expression power of grammars is great. However, sometimes it is
quite comlicated to express simple things. For example, the definition
of numbers is quite long and messy: (Of course, it is possible to write
a different grammar for the numbers, this is not a unique definition.)
@@ -274,8 +278,7 @@
@specname=initvalue
@specname(param_1, param_2, ...)
@specname(param_1, param_2, ...)=initvalue
-
-Note that the number and type of parameters is not unique, but if
+ Note that the number and type of parameters is not unique, but if
Kaptain cannot interpret a certain parameter in some position, then it
will be simply ignored.
@@ -285,14 +288,14 @@
File: kaptain.info, Node: Quotations, Next: Regulas expressions and translations, Prev: Special symbols, Up: Grammar Scripts
-Quotations
-==========
+3.3 Quotations
+==============
- Quotations are the constructions for specifying a literal string,
-which is a terminal symbol in the grammar. Kaptain understands a great
-variety of quotations in order to make it possible to write character
-sequences in the easiest way. The possibble quotations are similar to
-those of the language perl and the unix shells.
+Quotations are the constructions for specifying a literal string, which
+is a terminal symbol in the grammar. Kaptain understands a great variety
+of quotations in order to make it possible to write character sequences
+in the easiest way. The possibble quotations are similar to those of the
+language perl and the unix shells.
_Double quotes_
Strings between double quotes are weakly quoted strings. This
@@ -392,11 +395,12 @@
... "Here goes\nthe long text"
__
+
File: kaptain.info, Node: Regulas expressions and translations, Next: Using text manipulation in grammar rules, Prev: Quotations, Up: Grammar Scripts
-Regulas expressions and translations
-====================================
+3.4 Regulas expressions and translations
+========================================
* Menu:
@@ -414,10 +418,10 @@
File: kaptain.info, Node: Regular expressions, Next: Substitutions, Prev: Regulas expressions and translations, Up: Regulas expressions and translations
-Regular expressions
--------------------
+3.4.1 Regular expressions
+-------------------------
- Kaptain understands regular expressions like grep or perl. For a
+Kaptain understands regular expressions like grep or perl. For a
detailed review, type `man grep' or `man perlre' at the command prompt.
You can give a regular expression as a parameter to some special
symbols, like this:
@@ -444,11 +448,11 @@
File: kaptain.info, Node: Substitutions, Next: Transliterations, Prev: Regular expressions, Up: Regulas expressions and translations
-Substitutions
--------------
+3.4.2 Substitutions
+-------------------
- Substitution is based on regular expression matching just like in
-perl or sed. (For some metacharacters, sed uses different syntax.)
+Substitution is based on regular expression matching just like in perl
+or sed. (For some metacharacters, sed uses different syntax.)
Substitution expression needs a regular expression and a substitution
string as an input:
s/regexp/subs/
@@ -471,10 +475,10 @@
File: kaptain.info, Node: Transliterations, Prev: Substitutions, Up: Regulas expressions and translations
-Transliterations
-----------------
+3.4.3 Transliterations
+----------------------
- Transliteration is a very simple operation which replaces some
+Transliteration is a very simple operation which replaces some
characters with some others.
tr/abc/def/
This replaces `a' with `d', `b' with `e', `c' with `f'.
@@ -482,10 +486,10 @@
File: kaptain.info, Node: Using text manipulation in grammar rules, Prev: Regulas expressions and translations, Up: Grammar Scripts
-Using text manipulation in grammar rules
-========================================
+3.5 Using text manipulation in grammar rules
+============================================
- If you put some substitution or transliteration expressions on the
+If you put some substitution or transliteration expressions on the
beginning of the right side of a rule, those are executed each time when
text is generated with that rule. This means that for
no_jim_and_joe -> s/Jim/Peter/g s/Joe/Peter/g tr/+/-/ @string;
@@ -500,12 +504,12 @@
File: kaptain.info, Node: Examples, Next: External Control, Prev: Grammar Scripts, Up: Top
-Examples
-********
+4 Examples
+**********
- If you write your own grammars, and you think they might be useful
-for others, please send them to me <terek@users.sourceforge.net>, I
-will put them to the main Kaptain site.
+If you write your own grammars, and you think they might be useful for
+others, please send them to me <terek@users.sourceforge.net>, I will
+put them to the main Kaptain site.
* Menu:
@@ -516,11 +520,11 @@
File: kaptain.info, Node: Sound recording, Next: Creating archives, Prev: Examples, Up: Examples
-Sound recording
-===============
+4.1 Sound recording
+===================
- Let's record from the microphone connected to the computer. The
-command is
+Let's record from the microphone connected to the computer. The command
+is
terek@fido:~$ dd count=5 bs=8 < /dev/audio > myfile.au
It would be better to see a beautiful dialog. The grammar
#!/usr/local/bin/Kaptain
@@ -535,21 +539,21 @@
File: kaptain.info, Node: Creating archives, Next: Calling perl, Prev: Sound recording, Up: Examples
-Creating archives
-=================
+4.2 Creating archives
+=====================
- Here is a simple grammar, just witten in 5 minutes (may contain
-errors, check before you try to use it!)
+Here is a simple grammar, just witten in 5 minutes (may contain errors,
+check before you try to use it!)
#!/usr/bin/kaptn
-
+
start "Tar" -> tar buttons;
-
+
tar -> "tar " choice " " opt archive " " files;
opt:framed :horizontal -> extropt createopt ;
-
+
createopt "Write options" -> dump remove verb comp;
extropt "Read options" -> noerr keep same abs;
-
+
dump "Dump files, not just symlinks" -> "--dereference " | @;
noerr"Ignore failed read" -> "--ignore-failed-read " | @;
keep "Keep existing files" -> "-k " | @;
@@ -558,12 +562,12 @@
remove "Remove files after adding to archive"
-> "--remove-files " | @;
verb "Verbosely list files proceeded" -> "-v " | @;
-
+
comp -> compress | @;
compress "Compression" -> gzip | bzip;
gzip "gzip" -> "-z ";
bzip "bzip2" -> "--use-compress-program bzip2 ";
-
+
choice:framed -> work;
work "Main choice" -> concat | ! create | diff | del | append
| list | update | extract;
@@ -575,11 +579,11 @@
list "List contents" -> "t";
update "Update archive" -> "u";
extract "Extract from archive" -> "x";
-
+
archive "Archive name" -> @infile;
-
+
files "Files to work with" -> @string ;
-
+
buttons :horizontal -> @action(tar)="OK" @close="Cancel";
<#if output="html">
@@ -590,12 +594,11 @@
File: kaptain.info, Node: Calling perl, Prev: Creating archives, Up: Examples
-Calling perl
-============
+4.3 Calling perl
+================
- Kaptain can generate various texts, such as complicated pipes or a
-piece of perl code. To create your encrpyted password, use the perl
-command:
+Kaptain can generate various texts, such as complicated pipes or a piece
+of perl code. To create your encrpyted password, use the perl command:
print crypt('passwd','sa')."\n";
Let's make the grammar:
@@ -613,10 +616,10 @@
File: kaptain.info, Node: External Control, Next: Errors, Prev: Examples, Up: Top
-External Control
-****************
+5 External Control
+******************
- This chapter describes the communication with the dialog in Kaptain.
+This chapter describes the communication with the dialog in Kaptain.
The most interesting new feature in Kaptain 0.7 is the possibility of
modifying the data in the widgets while Kaptain is running. For this,
@@ -661,11 +664,11 @@
File: kaptain.info, Node: Errors, Next: Reference of Special Symbols, Prev: External Control, Up: Top
-Errors
-******
+6 Errors
+********
- Kaptain reads the given file and parses the grammar according the
-rules in *Note Grammar Scripts::.
+Kaptain reads the given file and parses the grammar according the rules
+in *Note Grammar Scripts::.
If Kaptain finds something that is not according the rules described
in this manual, it either signals an error or just a warning.
@@ -684,8 +687,8 @@
File: kaptain.info, Node: Reference of Special Symbols, Next: Reference of Modifiers, Prev: Errors, Up: Top
-Reference of Special Symbols
-****************************
+7 Reference of Special Symbols
+******************************
`@integer'
creates an integer input field with up and down arrows, which can
@@ -693,7 +696,7 @@
integer parameters are accepted, these are the minimum and maximum
values. Initial value can be an integer, too. For example,
@integer(-10,20)=4
- will create an integer input which can store a number between -10
+ will create an integer input which can store a number between -10
and 20, and is initially set to 4. The minimum and maximum value
default to 0 and 99, respectively, while the uninitialized field
is set to 0.
@@ -705,8 +708,8 @@
maximum length of the string is bounded by that number. For
example,
@string(20)="Hello"
- creates an input field with `Hello' inside, allowing strings of
- at most 20 characters.
+ creates an input field with `Hello' inside, allowing strings of at
+ most 20 characters.
This object evaluates to the value of the input field.
@@ -898,6 +901,7 @@
Displays an image in the dialog. The first parameter should be
string, which is the name of a graphic file. Several file formats
are recognized. From Qt's manual:
+
Qt currently supports the following image file formats: PNG,
BMP, XBM, XPM and PNM. It may also support JPEG, MNG and GIF,
if specially configured during compilation. The different PNM
@@ -919,14 +923,15 @@
wildcards in font descriptions, nor the aliases at this time. A
fully specified font looks like this:
+
File: kaptain.info, Node: Reference of Modifiers, Next: Concept Index, Prev: Reference of Special Symbols, Up: Top
-Reference of Modifiers
-**********************
+Appendix A Reference of Modifiers
+*********************************
- Modifiers always begin with a colon and are related to the
-nonterminal after which they appear. For example:
+Modifiers always begin with a colon and are related to the nonterminal
+after which they appear. For example:
start :framed :horizontal -> a b c ;
@@ -997,112 +1002,150 @@
visible) external communication can be used. *Note External
Control::.
+
File: kaptain.info, Node: Concept Index, Prev: Reference of Modifiers, Up: Top
Concept Index
*************
+ [index ]
* Menu:
* action: Reference of Special Symbols.
-* Asking message: External Control.
-* Backquotes: Quotations.
+ (line 97)
+* Asking message: External Control. (line 39)
+* Backquotes: Quotations. (line 46)
* beside: Reference of Modifiers.
+ (line 40)
* button: Reference of Special Symbols.
-* Client socket: Invoking Kaptain.
+ (line 80)
+* Client socket: Invoking Kaptain. (line 41)
* close: Reference of Special Symbols.
-* Comments: Grammar Scripts.
-* Communication channels: External Control.
+ (line 94)
+* Comments: Grammar Scripts. (line 14)
+* Communication channels: External Control. (line 6)
* container: Reference of Special Symbols.
+ (line 166)
* Context-free grammar: The Concepts of Kaptain.
+ (line 16)
* detailed: Reference of Modifiers.
+ (line 68)
* dialog: Reference of Modifiers.
+ (line 46)
* Dialog box: The Concepts of Kaptain.
+ (line 21)
* double: Reference of Modifiers.
-* Double quotes: Quotations.
+ (line 36)
+* Double quotes: Quotations. (line 13)
* dump: Reference of Special Symbols.
+ (line 120)
* echo: Reference of Special Symbols.
+ (line 116)
* edit: Reference of Special Symbols.
+ (line 226)
* exec: Reference of Special Symbols.
+ (line 106)
* execclose: Reference of Special Symbols.
-* External control: External Control.
+ (line 110)
+* External control: External Control. (line 6)
* fill: Reference of Special Symbols.
+ (line 202)
* float: Reference of Special Symbols.
+ (line 30)
* fork: Reference of Special Symbols.
-* Formal languages: Grammars.
+ (line 101)
+* Formal languages: Grammars. (line 60)
* framed: Reference of Modifiers.
-* Generating text: Grammars.
+ (line 17)
+* Generating text: Grammars. (line 31)
* Grammar: The Concepts of Kaptain.
+ (line 16)
* Grammar script: The Concepts of Kaptain.
-* Grammar scripts: Grammars.
-* Grammars: Grammars.
-* help: Invoking Kaptain.
+ (line 16)
+* Grammar scripts: Grammars. (line 6)
+* Grammars: Grammars. (line 6)
+* help: Invoking Kaptain. (line 27)
* horizontal: Reference of Modifiers.
+ (line 23)
* icon: Reference of Special Symbols.
+ (line 214)
* infile: Reference of Special Symbols.
+ (line 139)
* integer: Reference of Special Symbols.
-* Language: Grammars.
+ (line 7)
+* Language: Grammars. (line 60)
* list: Reference of Special Symbols.
-* Multiline quotes: Quotations.
-* No input: Invoking Kaptain.
-* No output: Invoking Kaptain.
+ (line 49)
+* Multiline quotes: Quotations. (line 89)
+* No input: Invoking Kaptain. (line 61)
+* No output: Invoking Kaptain. (line 65)
* noeval: Reference of Modifiers.
-* Nonterminal symbol: Grammars.
+ (line 31)
+* Nonterminal symbol: Grammars. (line 20)
* password: Reference of Special Symbols.
-* Perlish exection quotes: Quotations.
-* Perlish single quotes: Quotations.
-* Pipe: Invoking Kaptain.
-* Quotations: Quotations.
+ (line 44)
+* Perlish exection quotes: Quotations. (line 80)
+* Perlish single quotes: Quotations. (line 66)
+* Pipe: Invoking Kaptain. (line 51)
+* Quotations: Quotations. (line 6)
* regexp: Reference of Special Symbols.
-* Regular expression based substitution: Substitutions.
-* Regular expression's subexpression: Regular expressions.
-* Regular expressions: Regular expressions.
+ (line 37)
+* Regular expression based substitution: Substitutions. (line 6)
+* Regular expression's subexpression: Regular expressions. (line 23)
+* Regular expressions: Regular expressions. (line 6)
* reverse: Reference of Modifiers.
-* Scripts: Grammars.
-* Sentence: Grammars.
-* Server socket: Invoking Kaptain.
-* Setting message: External Control.
-* Single quotes: Quotations.
-* Special symbol: Special symbols.
+ (line 27)
+* Scripts: Grammars. (line 6)
+* Sentence: Grammars. (line 60)
+* Server socket: Invoking Kaptain. (line 46)
+* Setting message: External Control. (line 17)
+* Single quotes: Quotations. (line 35)
+* Special symbol: Special symbols. (line 16)
* stack: Reference of Modifiers.
-* Standard input: Invoking Kaptain.
+ (line 72)
+* Standard input: Invoking Kaptain. (line 56)
* string: Reference of Special Symbols.
-* Subexpression: Regular expressions.
-* Substitution: Substitutions.
+ (line 20)
+* Subexpression: Regular expressions. (line 23)
+* Substitution: Substitutions. (line 6)
* tabbed: Reference of Modifiers.
-* Terminal symbols: Grammars.
-* Test mode: Invoking Kaptain.
+ (line 20)
+* Terminal symbols: Grammars. (line 23)
+* Test mode: Invoking Kaptain. (line 30)
* text: Reference of Special Symbols.
-* Text generation: Grammars.
-* transliteration: Transliterations.
+ (line 206)
+* Text generation: Grammars. (line 31)
+* transliteration: Transliterations. (line 6)
* tree: Reference of Modifiers.
-* Version: Invoking Kaptain.
+ (line 56)
+* Version: Invoking Kaptain. (line 24)
* wizard: Reference of Modifiers.
+ (line 50)
Tag Table:
-Node: Top185
-Node: The Concepts of Kaptain508
-Node: Invoking Kaptain3213
-Node: Grammar Scripts5634
-Node: Grammars6406
-Node: Special symbols9183
-Node: Quotations10988
-Node: Regulas expressions and translations15856
-Node: Regular expressions16552
-Node: Substitutions17970
-Node: Transliterations19153
-Node: Using text manipulation in grammar rules19472
-Node: Examples20330
-Node: Sound recording20695
-Node: Creating archives21391
-Node: Calling perl23333
-Node: External Control24084
-Node: Errors26155
-Node: Reference of Special Symbols27080
-Node: Reference of Modifiers37659
-Node: Concept Index40650
+Node: Top316
+Node: The Concepts of Kaptain639
+Node: Invoking Kaptain3353
+Node: Grammar Scripts5778
+Node: Grammars6553
+Node: Special symbols9342
+Node: Quotations11154
+Node: Regulas expressions and translations16028
+Node: Regular expressions16732
+Node: Substitutions18159
+Node: Transliterations19351
+Node: Using text manipulation in grammar rules19679
+Node: Examples20542
+Node: Sound recording20908
+Node: Creating archives21609
+Node: Calling perl23511
+Node: External Control24267
+Node: Errors26339
+Node: Reference of Special Symbols27265
+Node: Reference of Modifiers37848
+Node: Concept Index40859
End Tag Table