They are simple (?) text files and typically sit in /etc/gaby/ or ~/.gaby/. They can be created using the builder but since this utility is not perfect (yet) and that description files may be somewhat complex it is interesting to be able to write one by hand.
Description files are divided in sections which begin with Begin <section_name> and end with End. Common sections are tables, locations, subtables, actions and misc.
They may contain comments which are lines starting with # anywhere [1] between or in sections.
We'll know look closely at each section with a stupid example; let's say we're a little bookseller (even if being an e-bookseller would certainly help to bring money) and we want to know what we have in our store [2].
Begin tables Books Title:string Category:string Price:real Amount:integer Remarks:strings End |
This defines a table with 5 fields :
Title, with type string
Category, with type string
Price, with type real
Amount, with type integer
Remarks, with type strings
The list of available types is available in Table 7-1.
Table 7-1. Field types
String | comment | |||
Strings | comment | |||
Integer | comment | |||
Real | comment | |||
Date | comment | |||
Boolean | comment | |||
Multimedia | comment |
Important: Indentations are made using tabulations, not spaces !
[1] | this is not really true, read on ... |
[2] | We could also manage customers, print orders, ... but this is an example |