home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume20 / index-db / part01 / README < prev    next >
Encoding:
Text File  |  1989-10-23  |  3.1 KB  |  75 lines

  1.                             August 9, 1989
  2.  
  3. This is "index", Version 1.0.
  4.  
  5. Over the years, I've accumulated a number of files in my directory which
  6. hold lists of various things.  I have a list of business addresses, no
  7. less than three personal address and phone lists, a list of all the books
  8. I own, a list of my compact discs, and so on.  Each of these files has a
  9. different format, has to be maintained manually with a text editor, can
  10. only be searched with "grep", and is difficult to keep nicely sorted.
  11.  
  12. Well, I got sick and tired of this.  So, I sat down and started hacking,
  13. and came up with "index".  Index allows you to maintain multiple
  14. databases of textual information, each with a different format.  With
  15. each database, index allows you to:
  16.  
  17.     - add entries
  18.     - delete entries
  19.     - edit existing entries
  20.     - search for entries using full regular expressions
  21.     - control what parts of an entry are searched
  22.     - print out entries matching a pattern
  23.     - run all or part of the database through an arbitrary
  24.       formatting program
  25.  
  26. The databases index maintains are stored as simple lines of text.  Each
  27. field of an entry is a line of text, and each entry in the database is
  28. made up of a fixed number of lines.  For each database, you tell index
  29. what each field's (line's) name is.  You can have multiple-line fields by
  30. leaving that field's name blank.  There's no fancy storage algorithm,
  31. things are just stored sequentially.  But for the biggest database I've
  32. got, about 500 5-line entries, performance is just fine.
  33.  
  34. Index uses the Berkeley curses library.  It has been tested on a Sun-3
  35. under SunOS 4.0.1 (4.3BSD curses) and on a Sequent Balance under Dynix
  36. 3.0.14 (4.2BSD curses).  It should be fairly easy to port to System V -
  37. you'll need to modify screen.c to resolve any curses incompatibilities,
  38. and you'll need to change the calls to the regular expression library
  39. routines in searchdb.c to use the System V style routines.
  40.  
  41. To compile index, just say "make".  Then make a directory in your home
  42. directory called ".index" (or set the environment variable INDEXDIR to
  43. point somewhere else).  Now, just say "index", and you can create your
  44. first database description file.  The directory "samples" contains some
  45. sample database description files and formatting scripts:
  46.  
  47.     books.idx    - for keeping a list of books sorted by author.
  48.     books.fmt    - formats the database into a tbl input file
  49.               which prints in two columns in landscape
  50.               mode.
  51.  
  52.     bphone.idx    - for a business phone/address database.
  53.  
  54.     cdlist.idx    - for keeping a list of compact discs.
  55.     cdlist.fmt    - formats the database into a wide landscape-mode
  56.               tbl input file.
  57.  
  58.     pphone.idx    - for keeping a personal phone/address database
  59.               with home and work addresses and phone numbers
  60.               for your friends.
  61.     pphone.fmt    - formats the database into a troff file which
  62.               lists each person along with their home and
  63.               work addresses.  Useful for keeping by the
  64.               phone or sending Xmas cards..
  65.  
  66. Since moving all my lists into the index program, I've found things a lot
  67. easier to keep track of.  I hope you'll find it as useful as I do.
  68.  
  69. David A. Curry
  70. Research Institute for Advanced Computer Science
  71. Mail Stop 230-5
  72. NASA Ames Research Center
  73. Moffett Field, CA 94035
  74.  
  75.