<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML ><HEAD ><TITLE >Description files</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Gaby's documentation" HREF="index.html"><LINK REL="UP" TITLE="Introduction" HREF="c139.html"><LINK REL="PREVIOUS" TITLE="Introduction" HREF="c139.html"><LINK REL="NEXT" TITLE="locations" HREF="x208.html"></HEAD ><BODY CLASS="CHAPTER" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Gaby's documentation</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="c139.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="x208.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="CHAPTER" ><H1 ><A NAME="DESCFILES" ></A >Chapter 1. Description files</H1 ><P >They are simple (?) text files and typically sit in <TT CLASS="FILENAME" >/etc/gaby/</TT > or <TT CLASS="FILENAME" >~/.gaby/</TT >. They can be created using the <B CLASS="COMMAND" >builder</B > 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.</P ><P >Description files are divided in <SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >sections</I ></SPAN > which begin with <B CLASS="COMMAND" >Begin <section_name></B > and end with <B CLASS="COMMAND" >End</B >. Common sections are <SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >tables</I ></SPAN >, <SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >locations</I ></SPAN >, <SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >subtables</I ></SPAN >, <SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >actions</I ></SPAN > and <SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >misc</I ></SPAN >.</P ><P >They may contain comments which are lines starting with # anywhere <A NAME="AEN158" HREF="#FTN.AEN158" ><SPAN CLASS="footnote" >[1]</SPAN ></A > between or in sections.</P ><P >We'll know look closely at each section with a stupid example; let's say we're a little bookseller (even if being an <SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >e-</I ></SPAN >bookseller would certainly help to bring money) and we want to know what we have in our store <A NAME="AEN162" HREF="#FTN.AEN162" ><SPAN CLASS="footnote" >[2]</SPAN ></A >.</P ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="AEN164" >1.1. tables</A ></H1 ><PRE CLASS="PROGRAMLISTING" >Begin tables Books Title:string Category:string Price:real Amount:integer Remarks:strings End</PRE ><P >This defines a table with 5 fields : <P ></P ><UL ><LI ><P >Title, with type string</P ></LI ><LI ><P >Category, with type string</P ></LI ><LI ><P >Price, with type real</P ></LI ><LI ><P >Amount, with type integer</P ></LI ><LI ><P >Remarks, with type strings</P ></LI ></UL ></P ><P >The list of available types is available in <A HREF="c142.html#TAB-FIELDTYPES" >Table 1-1</A >.</P ><DIV CLASS="TABLE" ><A NAME="TAB-FIELDTYPES" ></A ><P ><B >Table 1-1. Field types</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><COL><COL><COL><TBODY ><TR ><TD >String</TD ><TD >comment</TD ><TD > </TD ><TD > </TD ><TD > </TD ></TR ><TR ><TD >Strings</TD ><TD >comment</TD ><TD > </TD ><TD > </TD ><TD > </TD ></TR ><TR ><TD >Integer</TD ><TD >comment</TD ><TD > </TD ><TD > </TD ><TD > </TD ></TR ><TR ><TD >Real</TD ><TD >comment</TD ><TD > </TD ><TD > </TD ><TD > </TD ></TR ><TR ><TD >Date</TD ><TD >comment</TD ><TD > </TD ><TD > </TD ><TD > </TD ></TR ><TR ><TD >Boolean</TD ><TD >comment</TD ><TD > </TD ><TD > </TD ><TD > </TD ></TR ><TR ><TD >Multimedia</TD ><TD >comment</TD ><TD > </TD ><TD > </TD ><TD > </TD ></TR ></TBODY ></TABLE ></DIV ><DIV CLASS="IMPORTANT" ><P ></P ><TABLE CLASS="IMPORTANT" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="../images/important.gif" HSPACE="5" ALT="Important"></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >Indentations are made using tabulations, not spaces !</P ></TD ></TR ></TABLE ></DIV ></DIV ></DIV ><H3 CLASS="FOOTNOTES" >Notes</H3 ><TABLE BORDER="0" CLASS="FOOTNOTES" WIDTH="100%" ><TR ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="5%" ><A NAME="FTN.AEN158" HREF="c142.html#AEN158" ><SPAN CLASS="footnote" >[1]</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="95%" ><P >this is not really true, read on ...</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="5%" ><A NAME="FTN.AEN162" HREF="c142.html#AEN162" ><SPAN CLASS="footnote" >[2]</SPAN ></A ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="95%" ><P >We could also manage customers, print orders, ... but this is an example</P ></TD ></TR ></TABLE ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="c139.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="x208.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Introduction</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="c139.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >locations</TD ></TR ></TABLE ></DIV ></BODY ></HTML >