GNU Dico Manual (split by node):   Section:   Chapter:FastBack: Modules   Up: Modules   FastForward: Interface   Contents: Table of ContentsIndex: Concept Index

5.1 Outline

The outline module supports databases written in Emacs outline mode. It is not designed for storing large amounts of data, its purpose rather is to handle small databases that can be composed easily and quickly using the Emacs editor.

The outline mode is described in Outline Mode in The Emacs Editor. In short, it is a usual plain text file, containing header lines and body lines. Header lines start with one or more stars, the number of starts indicating the nesting level of the heading in the document structure: one star for chapters, two stars for sections, etc. Body lines are anything that is not header lines.

The outline dictionary must have at least a chapter named ‘Dictionary’, which contains the dictionary corpus. Within it, each section is treated as a dictionary article, its header line giving the headword, and its body lines supplying the article itself. Apart from this, two more chapters have special meaning. The ‘Description’ chapter gives a short description to be displayed on SHOW DB command, and the ‘Info’ chapter supplies a full database description for SHOW INFO output. Both chapters are optional.

All three reserved chapter names are case-insensitive.

To summarize, the structure of an outline database is:

* Description
line
   
* Info
text

* Dictionary

** line
text

[any number of entries follows]

As an example of outline format, the GNU Dico package includes Ambrose Bierce’s Devil’s Dictionary in this format, see examples/devdict.out.

The initialization of the outline module does not require any command line parameters. To declare a database, supply its full file name to the database handler directive, as shown in the example below:

load-module outline;

database {
   name "devdict";
   handler "outline /var/db/devdict.out";
}

GNU Dico Manual (split by node):   Section:   Chapter:FastBack: Modules   Up: Modules   FastForward: Interface   Contents: Table of ContentsIndex: Concept Index