grok


     NAME
          grok - Desktop Database Manager and GUI Builder

     SYNOPSIS
          grok [-h] [-d] [-v] [-t] [-T] [-f] [form query]]

     DESCRIPTION
          grok is a database manager that displays two-dimensional
          databases using a card file paradigm. A GUI builder is
          available to create user-defined applications. Grok comes
          with a number of pre-built applications such as a phone
          directory, todo lists, and a sample country database. The
          form to display (phone, todo, countries, etc.) can be given
          as the first parameter. This manual page describes the
          command line options of grok.  For information on how to use
          grok, refer to the on-line help pages, and to the PostScript
          or TeX manual.

        OPTIONS
          -h   List available options.

          -d   Print fallback X resources and exit. The output can be
               appended directly to the ~/.Xdefaults file for
               modification of the geometry, color, and font defaults.

          -v   Print the program version and patchlevel and exit.

          -t   Requires specification of a form. Without a query
               string, prints all cards to stdout in the same format
               that is used for the summary window in interactive
               mode. If a query is also specified, print only cards
               that satisfy the query expression (see below). The form
               may have a default query built in.

          -T   This option is equivalent to -t, but omits the header
               line.

          -f   Don't fork on startup. This is useful for debugging.

          form Specifies the database to display.  Grok distinguishes
               forms and databases. Both always come in pairs. The
               form defines the representation of the cards and the
               database provides the raw data. If no form is
               specified, one can be chosen in interactive mode. The
               -t and -T options require a form argument.

          query
               If the form has a built-in query, it is used to select
               which cards in the database to display initially. If
               there is no default query, all cards are displayed. The
               query argument can be used to override the default
               query.  This option should always be quoted with single
               quotes to keep the shell from interpreting the query
               string.

          There are different types of queries: '*' selects all cards,
          '/string' performs a case-insensitive string search,
          '{expr}' selects all cards for which the string expression
          returns a non-null, non-'f' string, and '(expr)' selects all
          cards for which the numerical expression returns nonzero.
          The leading '/' in string searches is optional. For a
          detailed description of query expressions, refer to the
          "Expression Grammar" item in the help pulldown, or to the
          PostScript user's manual.

          In addition to these options, grok supports the usual X
          options such as -iconic. The -geometry option should not be
          used to preset a window size; grok determines and frequently
          adjusts its own size.

     EXAMPLES
          grok

          Start up grok with no form. The Database pulldown can be
          used to choose one.

          grok phone

          Start up grok with the phone form. Perform that form's
          default query if it has one.

          grok phone '/thomas'

          Start up grok with the phone form. Ignore the default query
          and select only cards that contain the word "thomas". Case
          is ignored.

          grok -t phone '/thomas'

          Print all cards of the form phone to stdout that contain the
          string "thomas". Do not start the interactive user
          interface.

          grok phone '{_group == "f" && _email}'

          Start up grok with the phone form. Ignore the default query
          and select only cards that describe friends that have an
          email address.

     FILES
          Below, GBIN and GLIB refer to the installation directories
          specified at the beginning of the Imakefile when the
          programs were compiled. They are /usr/local/bin and
          /usr/local/lib, respectively, by default.
          *.gf              Files ending with the extension .gf are
                            assumed to contain grok forms.

          *.db              Unless the form specifies otherwise, the
                            database that provides the raw data for a
                            form has the same path and name as the
                            form, but with the extension .db.
                            Procedural databases have no extension.

          .                 The current directory is searched first
                            for form files.

          ./grokdir         The grokdir current directory is searched
                            next for form files. This is done to allow
                            grok to be started from the source
                            distribution directory for evaluation.

          ~/.grok           By default, all forms and databases are
                            stored here. By convention, all private
                            forms and databases are stored here. This
                            directory is searched after . and
                            ./grokdir.

          GLIB/grokdir      This directory is searched last. It is
                            supposed to contain forms visible to all
                            users of a system. Only one user should
                            have write permission.

          ~/.grok/.grokrc   Preferences and the current configuration
                            of grok.

          GBIN/grok         The grok executable. This should be in the
                            user's search path. Form files are set up
                            so they can be "executed" by feeding
                            themselves to grok, as long as grok is in
                            the search path $PATH.

          GLIB/grok.hlp     All help texts used by the grok help
                            system.

        AUTHOR
          Thomas Driemeyer <thomas@bitrot.in-berlin.de>

          Please send all complaints, comments, bug fixes, and porting
          experiences to me. Always include your grok version as
          reported by "grok -v" in your mail. New forms for inclusion
          in the distribution are welcome. Make sure that your email
          address is in the form's comment field, and that there is
          some help information attached to the form with the Def Help
          function.