# IndexTools v1.0 - Tools to compress and work with CDROM indicies.
# Copyright 1996 - NPX Enterprises - Richmond, BC

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

# Written by Cory Omand.

	Ever try to track down a file on one of those 50 Linux CDROMs you have scattered
across your desk? And you just know that the one file you need the most is buried deep under
about 20 directory levels. As it is often said, if you need these tools, you need them bad.

INSTALLATION.

	1) Change the permissions on the scripts to whatever you wish. 750 is ok.
	2) Place them somewhere in your path. I prefer to have them in ~/bin.
	3) Make some minor modifications:

		a) indexcd:  DRIVE, TEMP, and COMP (see script for details)

		   note: if you are going to use combine to make one big index
			 file (which makes looking for things quite fast), leave
			 COMP set to 0.
		            
		b) combine:  No modifications necessary.

		c) findex: IDXPATH should be set to wherever you will be storing
			   your indicies. I have mine in ~/.idx, so they are hidden
			   away. You will have to create this directory and place the
			   indicies in there manually.
	
	4) Start Making indicies....

USAGE.

(1)	Creating the indicies takes a little time (it would take more if you didnt have these
	scripts to help you out :), but it will also save you a bunch of time one late night...
	The syntax is as follows...

		indexcd <path to cdrom> <Disc#> <Release_Name> <Release_Date> <Output_File>

	<path to cdrom> - enter the regular mount directory for your cdrom.
	<Disc#>		- CD Number
	<Release_Name>  - There must be no spaces in this name
	<Release_Date>  - Same as Release Name... keep in mind the longer these two fields are,
			  the more things will scroll off the side of the screen when you view
			  the index.
	<Output_File>   - Again, no spaces, if you have COMP set to 1, do not include the
			  .gz extension.

	eg. 
		indexcd /cdrom Disc1 RedHat_Archives March_1996 index1
		indexcd /cdrom Disc2 RedHat_Archives March_1996 index2
					.
					.
		indexcd /cdrom Disc93 RedHat_Archives March_1996 index96

		... and so on.

(2)	After you have created all the indicies for one set of discs, or all the indicies for
	all the discs you own (Creating a single index of all your CDs will save you much more
	time in the long run), you can combine and compress them. Make a temporary directory
	and place ONLY THE INDEX files into that directory. You have been warned... if you have
	a binary or something like that sitting around in that directory, it will be written
	to the main index, and will mess with your terminal when you try to view it. Go into that
	directory, and simply:

		combine <Output_File>

	eg.
		combine myindex    ....will create.... myindex.gz

		<Output_File> must not have any spaces in the name, and dont include any extension. 
	When combine exits, you will have a nice shiny highly compressed index file to use.

(3)     Once you have all the index files you want to make, and they have been placed in the 
	directory that you specified in the findex script, you can use it to search in any of
	your indicies, also, you can use findex to search into other indicies available, such
	as the ls-lR.gz and INDEX.whole files on sunsite.

	ie.  If you had indicies called sunsite.gz, tsx.gz, gatekeeper.gz, and speedy.gz

		findex sunsite dosemu
		findex tsx ALPHA
		findex gatekeeper RedHat
		findex speedy [hH][tT][mM][lL]

		As findex uses grep, any pattern recognized by grep can be searched for, and
	searches can be narrowed once into the pager (less).



***************************************************************************************************
	    Copyright 1996 - NPX Enterprises - Richmond, British Columbia, Canada
***************************************************************************************************

		

