Eidetic Usage

Eidetic is a CGI program and as such takes parameters as inputs and emits its output to stdout. Inputs can be specified in several ways: an URL, as part of an HTML form, or even from the commandline. This document describes how to use Eidetic with each of these approaches, and how to retrieve data from it in several different ways.

Eidetic Parameters

Here is a summary of the most common parameters that Eidetic accepts as inputs:

Eidetic URL Usage

Eidetic can be called like any other CGI program using a set of parameters specified as part of an URL. Here is an example URL:

'http://www.site.org/eidetic.cgi?modulename=colors&command=display'

In the above, the question mark shows where the parameter list begins. Each 'key=value' pair is separated by an ampersand.

If you wish to submit data into the database, this can be done by specifying the table fields distinguished by having 'd_' prepended to them. For example:

'http://www.site.org/eidetic.cgi?modulename=colors&command=store&d_descriptor="lavender"'

If you need to get the results of a particular query in a programmatic means, here is how to do it via wget:

'$ wget -nd -O file.html http://www.mysite.org/eidetic.cgi?command=display&modulename=colors'

Eidetic Form Usage

In an HTML form, commands can be specified through the 'hidden' input widget, thusly:

'<INPUT TYPE="hidden" NAME="modulename" VALUE="colors">'
'<INPUT TYPE="hidden" NAME="command" VALUE="display">'

For table-specific parameters, prepend the field names with 'd_'.

Eidetic Commandline Usage

Since Eidetic uses 'CGI.pm', it is also possible to run Eidetic as a commandline utility. In this case, parameters are specified as space-separated instead of ampersand separated. For example:

'$ cd /usr/lib/cgi-bin/' '$ ./eidetic.cgi command=display modulename=colors > colors.html'

This will cause the table to be output as HTML to the file 'colors.html'. This is an extremely handy way to generate static pages (such as for caching).