makegharc Manual

makegharc is one of the main Glimpse HTTP script files. It is basically the script that configures an archive, generates the reindexing script ghreindex, and calls that script. makegharc should be located in the Glimpse HTTP binary directory.

Execution of makegharc

When the script is run, it first prompts the user for the directory the user would like to create the archive in. This is sometimes called the archive root directory. Note that all files and subdirectories of the specified directory will be indexed. This means that if there are a lot of files, all files will be indexed. For example, you probably do not want to index your home directory, but instead index your public_html directory. makegharc will not run if there is already an archive in the given directory (it checks for an existing archive.cfg file).

Note that indexing is not the same as generating a ghindex.html file; indexing a file puts it in the search database, while generating a ghindex.html file for directory DIR allows the user to search only a subset of the pages -- all files in DIR and all subdirectories within DIR.

The user is then prompted for:

  1. The archive title -- a descriptive name for the set of pages to be searched
  2. The URL for the root archive directory -- the URL to reach the directory specified above. For example: http://myserver.com/~myhome to get to my public_html directory (if that's how to get there from the WWW).
  3. Whether or not there should be a search page for each subdirectory -- If you would like each subdirectory to have its own search page (and therefore, allow a user to search only through the pages of a certain directory and all its subdirectories), answer 'y'. If you would like only the archive 'root' directory (as specified above)
  4. Whether to index files and create the search pages now -- If you would like glimpseindex to be called (generating the search database) and ghgenhtml to be called (generating all the ghindex.html search forms) right now, answer 'y' to this. Otherwise, answer 'n', and the indexing will have to be done 'by hand' later -- usually by simply calling the ghreindex script later.
  5. Whether to set up nightly reindexing -- If you answer 'y' to this question, makegharc will call crontab (a Unix utility, see the man pages for more information) to set up automatic reindexing (through a call to ghreindex) every night at 2AM.
After the user answers all of the questions, the archive configuration is saved in archive.cfg, and the selected operations are performed.

Also, .gheye.gif is copied into this directory (for reference by the search pages), and a .ghtemplate.html file is created in this directory. For more information on the .ghtemplate.html file, see the ghgenhtml manual.

Overview of the ghreindex script

ghreindex is a shell script that invokes:

Return to the Glimpse HTTP home page


Maintained by Michael Smith
glimpse@cs.arizona.edu