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

4.3.12 Databases

Dictionary databases are defined using the database block statement.

Configuration: database { statements }

Defines a dictionary database. At least two sub-statements must be defined for each database: name and handler.

Database: name string

Sets the name of this database (a single word). This name will be used to identify this database in DICT commands.

Database: handler string

Specifies the handler name for this database and any arguments for it. This handler must be previously defined using the load-module statement (see Handlers).

For example, the following fragment defines a database named ‘en-de’, which is handled by ‘dictord’ handler. The handler is passed one argument, database=en-de:

database {
        name "en-de";
        handler "dictorg database=en-de";
}

More directives are available to fine-tune the database.

Database: description string

Supplies a short description, to be shown in reply to SHOW DB command. The string may not contain new-lines.

Use this statement if the database itself does not supply a description, or if its description is malformed.

In any case, if the description directive is specified, its value takes precedence over the description string retrieved from the database itself.

See SHOW DB, for a description of SHOW DB command.

Database: info string

Supplies a full description of the database. This description is shown in reply to SHOW INFO (see SHOW INFO) command. The string is usually a multi-line text, so it is common to use here-document syntax (see here-document), e.g.:

info <<- EOT
   This is a foo-bar dictionary.
   Copyright (C) 2008 foo-bar dict group.
   Distributed under the terms of GNU Free
   Documentation license.
EOT;

Use this statement if the database itself does not supply a full description, or if its full description is malformed.

As with description, the value of info takes precedence over info strings retrieved from the database.

The following two directives control the content type and transfer encoding used when formatting replies from this database if OPTION MIME (see OPTION MIME) is in effect:

Database: content-type string

Sets the content type of the reply. E.g.:

directory {
   name "foo";
   handler "dictorg";
   content-type "text/html";
   ...
}   
Database: content-transfer-encoding enum

Sets transfer encoding to use when sending MIME replies for this database. Allowed values for enum are:

base64

Use BASE64 encoding.

quoted-printable

Use quoted-printable encoding.

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