HuntnGather – Rev 24
?pathlinks?
Short: File indexing and search utilities.
Author: Wizardry and Steamworks
Uploader: "Wizardry and Steamworks" <office@grimore.org>
Type: util/dir
Replaces: util/dir/HuntnGather.lha
Version: 1.7.3
Architecture: m68k-amigaos
Hunt & Gather - File search and indexing utilities.
(or Hunt'n'Gather bro, ghetto style)
© Copyright 2021 by Wizardry and Steamworks
Released under the MIT License, all rights reserved.
-=:[ Changes ]:=-
20201026:
* Use AsyncIO.
-=:[ Introduction ]:=-
Hunt and Gather are two utiltities for indexing and then searching
fileswithin a drive or directory designed to speed up searching files.
The Gather utility is meant to index any path and generate a search
database. The Hunt utility will then open the database generated by
Gather and look for files matching the string provided to Hunt as
parameter.
The utility was designed to check large collections of icons but the
indexing and the fast search results proved indispensable enough for a
self-standing program.
-=:[ Design ]:=-
Hunt and Gather are designed with constant memory usage in order to be
suitable for all Amiga models. Namely, the Gather utility will search
all files in a given path, sort the files in ascending order by using
an external merge sort (tailored down to a 256KiB memory limit).
Conversely, Hunt uses brute force to search for files but by reading
lines from the database without loading the entire database in RAM.
Perhaps ulterior versions of Hunt might partition the database file
just like Gather does and then build Tries in oder to speed up finding
files on the filesystem.
The project adheres to the ANSI C standard and Amiga-centric semantics
are compiled conditionally (in case the "___AmigaOS__" macro is
defined at compile time).Otherwise, Hunt & Gather should run under any
platform that benefits from an ANSI C compiler.
-=:[ Usage ]:=-
First the Gather utility is used to index a path:
Gather RAM:
which will create a file in the S: directory named "gahter.db". While
Gather is running, the utility will display the number of indexed
directories and files on the command line.
In order to look for a file, the Hunt utility is invoked with an
Amiga search pattern:
Hunt #?test#?
in this case, "#?test#?", that will be compared to all the files
indexed previously by Gather. In case any of the files previously
indexed by Gather contain the term "test", then the Hunt utility will
display the path to the file.
-=:[ Gather ]:=-
The Gather utility takes one single parameter representing the path
to be indexed; for example, all the following paths are valid:
RAM:
DH0:System/
When Gather runs, a database is created at "S:gather.db" by
overwriting the previous database. For best results, Gather should
run periodically and should scan a path that is most frequently
searched for files.
-=:[ Hunt ]:=-
Hunt is the counterpart to Gather and will search the database at
"S:gather.db" for files matching the terms passed to Hunt on the
command line.
For instance:
Hunt #?test#?
will search all files in the Gather database "S:gather.db" for the
term "test". If any file within the database partially matches the
term "test", then Hunt will display the path on the command line.
Hunt uses Amiga-style pattern for matching the file names.
-=:[ Source ]:=-
The project is open sourced and licensed under MIT. The source code
is included in the AmiNET release or can be checked out via subversion
from the Wizardry and Steamworks repository:
svn co http://svn.grimore.org/HuntnGather
-=:[ Mentions ]:=-
The code includes a shim for "getopt" in order to process command line
parameters on Amiga without changing the semantics. The shim is
created by Daniel J. Barrett, barrett@cs.umass.edu and is available on
AmiNET:
http://aminet.net/package/dev/misc/GetOpt-1.3
-=:[ Contact ]:=-
E-Mail(tor):
office@3wymlmcsvxiaqzmbepsdawqpk6o2qsk65jhms72qqjulk5u4bgmvs3qd.onion
Website: https://grimore.org/amiga/hunt_and_gather
Website(tor):
http://3wymlmcsvxiaqzmbepsdawqpk6o2qsk65jhms72qqjulk5u4bgmvs3qd.onion/
Discord: https://discord.gg/k9kyDsa