NAME
mg_get - output source texts for processing
SYNOPSIS
mg_get collection-name [-init|-i|-text|-t|-cleanup|-c]
DESCRIPTION
This program is the default one used by mgbuild to generate the source text for the MG system. Any program may be used to generate the source text for mgbuild as long as it confirms to the interface specified here.
OPTIONS
The collection-name must appear before any other option. Only the first option has any significance. If no option is specified -text is assumed.
MG_GETRC
This environment variable specifies where the file containing the users mg source configurations is. If not set, mg_get uses a default of ~/.mg_getrc.
This file contains TAB delimited lines of the form CollectionName CollectionType files or directory
CollectionName is the name of the collection supplied to mg_get.
CollectionType specifies how mg_get should process the named files and directories and are descibed below.
files or directory is either a list of files separted by blanks or a single directory. Some of the CollectionTypes deal with files and others with just a single directory. Any files used ending with .gz or .Z are decompressed with gzip before processing. References to `~' expands to the users HOME directory.
CollectionType is one of
PARA For text based documents. The list of files specified are treated as a series of paragraphs separated by blank lines. Each paragraph becomes a seperate document on the indexed collection.
MAIL for mail files. The list of files specified are treated as UNIX mail files separated by lines starting with `From'. Each mail message becomes a seperate document on the indexed collection. As a extra feature any embedded tarmail encoded contents (enclosed by a `xbtoa Begin' and `xbtoa End' pair are removed.
DIR (and DIR2) For a single directory of files. Each file in the directory (and in any of it's subdirectories) are treated as a single document. With DIR the pathname of the file is prefixed to the contents of each file as an extra line while this is not done for DIR2 collections.
BIB for biblography files. The list of files specified are treated as a series of biblography files (eg BIBTEX or TROFF) separated by lines starting with `@'. Each reference becomes a seperate document on the indexed collection.