bookinfo(5)
NAME
bookinfo − AnswerBook configuration file
SYNOPSIS
~/.bookinfo
/etc/bookinfo
bookinfo.byname
AVAILABILITY
bookinfo is available as part of OpenWindows Version 3.0.1 and the Solaris 2.0 operating system.
DESCRIPTION
The bookinfo file is the configuration file that docviewer(1), navigator(1), and related utilities use to locate components of a document collection.
AnswerBook users do not need to consult the bookinfo file, but administrators may need to edit it when setting up AnswerBook files in multiple directory trees.
An AnswerBook document collection consists of three components: a set of books, a top-level table of contents (TOC), and a search index.
The top-level TOC is simply a book that refers to other books in the collection. It serves as a starting point for TOC browsing operations such as that provided in navigator(1).
The search index is basically an inverted index containing an entry for each and every unique word in every document in the collection; it supports full-text searching on the entire contents of the collection. This inverted index and its ancillary files are kept together in a special directory that comprises the search index.
Each book in a document collection consists of a TOC database and a directory containing PostScript files that represent the pages of the book. Each book has a book-id
— a unique id used internally by the AnswerBook software to refer to a book.
All this collection configuration information is maintained in the bookinfo file. navigator(1) and docviewer(1) consult this file at start-up time and any other time they need to locate any of the AnswerBook components.
The bookinfo file contains a one-line entry for each book in a document collection, and one entry for the collection (including the top-level TOC). Each line contains the following five fields, separated by colons:
book-id:TOC-database-path:PostScript-path:search-index-path:label
book-id is the unique name assigned to the book. This field must be present in all bookinfo entries.
TOC-database-path
is the full pathname of the directory containing the TOC database for the book. The TOC database is implemented using ndbm(3B), which means that it consists of two files with the suffixes .dir and .pag. By convention, these files are named book-id.dir and book-id.pag. As an example, if the TOC database path for the ADMIN book is /usr/book, the two TOC database files for the ADMIN book would be:
/usr/book/ADMIN.dir and /usr/book/ADMIN.pag
PostScript-path
is the full path name of the directory containing the book’s PostScript directory. By convention the book’s id is used as the name of its PostScript directory. For example, if the PostScript path is /usr/book, the directory /usr/book/ADMIN would contain the PostScript files for the ADMIN book. If this field is blank, its value defaults to that of the TOC database path.
search-index-path
is the full path name of the search index for the document collection. Because there is only one search index for any given collection, the contents of this field are ignored in every bookinfo entry except the collection entry.
label is a comment field that typically contains version information for the given document collection. docviewer(1) and navigator(1) read and display the contents of this field.
Lines beginning with a pound-sign (#) are comment lines and are ignored by routines that read this file.
EXAMPLES
The following is a sample bookinfo file:
#
# Sample bookinfo file for collection AnswerBook
#
answerbook:/usr/book:/cdrom:/usr/book/index/answerbook:AnswerBook version 1.0
ADMIN:/usr/book:/cdrom::AnswerBook version 1.0
STREAMS:/usr/book:/cdrom::AnswerBook version 1.0
In this example, the first entry is the collection entry for the answerbook collection. Note that it has a search index. The second and third entries define the two books in the AnswerBook: ADMIN and STREAMS. According to this bookinfo file, the directory /usr/book should contain the following:
| /usr/book/answerbook.{dir,pag} | (TOC database for AnswerBook) |
| /usr/book/ADMIN.{dir,pag} | (TOC database for ADMIN book) |
| /usr/book/STREAMS.{dir,pag} | (TOC database for STREAMS book) |
| /usr/book/index/answerbook.∗ | (search index for AnswerBook) |
and the directory /cdrom should contain the following:
| /cdrom/answerbook/∗ | (PostScript files for AnswerBook) |
| /cdrom/ADMIN/∗ | (PostScript files for ADMIN) |
| /cdrom/STREAMS/∗ | (PostScript files for STREAMS) |
ENVIRONMENT
All AnswerBook utilities, including docviewer(1) and navigator(1), use the same scheme for locating the bookinfo entry for a particular book—they search each of the following locations in turn, using the first bookinfo entry they find that has the correct book-id.
BOOKINFO (Environment variable specifying the full pathname of the bookinfo file)
~/.bookinfo (Per-user bookinfo file)
/etc/bookinfo (Per-system bookinfo file)
bookinfo.byname (NIS map for network-wide bookinfo)
SEE ALSO
bookinfo(1), docviewer(1), navigator(1), mkbookinfo(8)
NOTES
The bookinfo file is set up automatically during AnswerBook installation.
Do not copy the TOC database files; they are in a special format and copies expand to many times the original size. If you need to move a TOC database to a new location, the most reliable way to do this is to delete the entire collection then reinstall it in the desired place.
The file formats for the full-text index and for the TOC database are internal to the AnswerBook and are currently unpublished.
For networks using NIS, one method for making the bookinfo configuration information available throughout the network is to put it in an NIS map. This eliminates the need for each individual AnswerBook user to set the BOOKINFO environment variable or maintain his or her own copy of the bookinfo file. This in turn simplifies bookinfo maintenance and updates, and eliminates some of the more common per-user AnswerBook configuration problems.
This feature is entirely optional—it is offered only for convenience of administration. To use it, create an NIS map for your network called bookinfo.byname that contains the contents of your bookinfo file, and uses the book-id field of each entry in the file as that entry’s key.
NOTES
PostScript is a trademark of Adobe Systems Incorporated.
AnswerBook is a trademark of Sun Microsystems, Inc., licensed to SunSoft, Inc.
SunOS 5.1/x86 — Last change: 18 March 1992