[comp.sources.amiga] v02i020: files - file catalog utility V1.2

page@swan.ulowell.edu (Bob Page) (10/25/88)

Submitted-by: dillon@cory.berkeley.edu (Matt Dillon)
Posting-number: Volume 2, Issue 20
Archive-name: dos/fs/files12.docs

# This is a shell archive.  Remove anything before this line
# then unpack it by saving it in a file and typing "sh file"
# (Files unpacked will be owned by you and have default permissions).
# This archive contains the following files:
#	files.doc
#
if `test ! -s files.doc`
then
echo "writing files.doc"
cat > files.doc << '\Rogue\Monster\'


			   FILE CATALOG UTILITY

By Matthew Dillon.

	dillon@ucbvax.berkeley.edu	(ARPANET)
	..!ihnp4!ucbvax!dillon		(USENET)

	Matthew Dillon
	891 Regal Rd.
	Berkeley, California 94708

	USA


WINDOW TITLE:
    Holds operational status.  Normally holds two numbers SELECTED/ENTRIES
    Where SELECTED is the number of files currently selected for viewing.
    The ALL gadget selects all entries for viewing.

PATTERN:
    Entering a wildcard pattern here selects for viewing those entries
    (file name or comment) which matches the pattern.  "+pattern" adds
    entries to the currently selected list, and "-pattern" removes entries
    from the currently selected list. "pattern" alone is equivalent to
    "-*" "+pattern".  Note that if looking for a specific program you need
    to specify it like:  "*viacom.arc" with the "*" in front to handle any
    prefix to the file.

    '*' and '?' are acceptable wildcards.  Any combination is allowed.  The
    search is case independant.

VOLUME:
    Entering a disk volume name (e.g. "df1:") or directory path
    (e.g. "df1:src/files") causes that volume/directory to be searched
    and all files to be added to the database.	The FULL path name is
    determined, including the volume name, independant of the original
    specification.  This means you can say "df1:" instead of "mydisk:" and
    entries in the database will begin "mydisk:blah..".

    When I say 'volume' in the following description I mean either a
    directory or volume.

    This also serves to UPDATE entries in the database.  Specifically, if
    the volume already exists in the database new files are added and files
    which no longer exist (in the volume) are removed.  Any comments which
    you have added to the database are KEPT.  Note, however, that if a
    file contains a comment field and the database entry also has a comment
    field the database entry's comment field is used.

    Example:  To add a whole lot of floppies simply specify DF0:, hit
    return, then place new floppies in DF0: and hit return without having
    to retype DF0: or even reselect the string gadget.

    NOTE!!  Each disk should have a unique volume name or it will exclude
    other disks!  Now that isn't too much to ask for, is it?

COMMENT:
    After selecting a file with the left mouse button you may enter a
    comment for it.  The comment field is automatically activated after
    selection and any previous comment loaded into the field.

SLIDE BAR:
    The slide bar is used to move around in the database.  Normally the
    database is too large for much resolution on the slide bar (mine is
    3821 entries at the moment), in which case one normally selects a
    subsection of the database with the PATTERN field before moving around.

    The display area places the comment after the longest file path in
    the currently selected subset, so you might have to make the window
    wider to see the comments.

INFO:
    Program info.  My name in lights!

DEL:
    Delete the highlighted item or the currently selected subsection of
    the database if there is no highlighted item.  YOU CAN DELETE THE
    ENTIRE DATABASE THIS WAY!! BUT...

UNDO:
    Undo the last delete operation.  For best results hit immediately
    after a DEL.

ALL:
    Selects the entire database for viewing.

----------------------------------------------------------------------------
				MENUS

    SAVE	save database under previously loaded name
    SAVEAS	save database under a new name
    LOADDEF	load the default database (s:catalog.db or previously
		 loaded file).	Information is appended to the memory
		 image.
    LOAD	specify a filename to load as the database.  Information
		 is appended as in LOADDEF
    QUIT	Quit the program (for those who do not know how to use
		the close gadget)
    ADDKILLPAT	Create a kill entry in the database (@@KILLPAT).  The
		comment field of this entry is a pattern.  If the pattern
		matches an about-to-be-loaded path the path is not loaded.
		Any number of kill entries may exist in the database.

		Example:    set the comment to *.o, and no object files
			    will be added from new volumes.


    The filerequester code was provided by Peter Da Silva and hacked
    moderately.  All other code is my own.

----------------------------------------------------------------------------
			    LIMITATIONS

    -Volume Names may not begin with @@
    -Volume Names beginning with '+' and '-' are o.k., but difficult to
     specify in the PATTERN field due to the special meaning of '+' & '-'.
    -Full File Paths and comments must be smaller than 128 characters each
    -There is no limitation to the database size except for the amount of
     memory you have.


----------------------------------------------------------------------------
			    FILE FORMAT

The database is an ascii file.	The first line is a number (3) specifying
the number of lines per entry.	The next line starts the first entry, with
3 lines per entry (and no extra lines at the end of the database).  No tabs
are allowed.  The initial number is used for upward compatibility when/if
I add more information to the database.  The three lines are:

    1	-file name
    2	-file comment
    3	-file size (bytes)

Future additions will also include:
    4	-date






\Rogue\Monster\
else
  echo "will not over write files.doc"
fi
if [ `wc -c files.doc | awk '{printf $1}'` -ne 5309 ]
then
echo `wc -c files.doc | awk '{print "Got " $1 ", Expected " 5309}'`
fi
echo "Finished archive 1 of 1"
# if you want to concatenate archives, remove anything after this line
exit
-- 
Bob Page, U of Lowell CS Dept.  page@swan.ulowell.edu  ulowell!page
Have five nice days.