previous | next




Angelscripts have 4 sections:

1. header

2. pre-commands

3. a-variables

4. main

The sections are separated by the 3 code words starting at the beginning of the line:




1) Header

The header contains a few variables, of which 'TYPE'  and 'TITLE' are mandatory. The following variables can be set:


defines the type of angel, i.e. 'file' or 'directory' ('find' is a third type, but it is virtual)


the title of the angel (quoting needed)


additional tags for the search


a unique identifier created with uuidgen to find the angel by reference independent of its location


a group name that groups angels together that share the same a-variables. This allows to set an a-variable in one angel and use it in another angel as well.


text encoding, not implemented

2) Pre-commands

This section is executed before the file is displayed. Any command can be placed here and its output redirected to a file. The file can then be quoted inside the angel with the @file-statement or the @include-statement.
It is useful to set parameters that a command can find like current user ID, IP address, etc. It is also useful to create possible options for a-variables.

angelscript code:


ls $HOME| wc -l > $ANSWERDIR/wc.count.txt



You have {{@file:wc.count.txt}} files in your home directory

...will produce (without colours):

You have 118 files in your home directory

The commands that are executed in pre-command section are sourced (!); all variables used in the script are available ($ANSWERDIR, see later). 

3) A-variables (angel-variables)

This is the a-variable section for possible values for an a-variable: If an a-variable is changed with the command 'd', a list with possible values is presented to the user for convenience. The format is :




If you have the same values for different variables, it is more convenient to echo it to $VARDLOCAL.

4) The main section

This section is displayed on the screen. A line starting with '@cmd:' starts a angel-command (see later).  The following codes can be used for colours/attributes:


<bold>, </bold>
<italics>, </italics>
<ul>, </ul>
<inv>, </inv>