HuntnGather – Blame information for rev 31
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | Short: File indexing and search utilities. |
2 | Author: Wizardry and Steamworks |
||
3 | Uploader: "Wizardry and Steamworks" <office@grimore.org> |
||
4 | Type: util/dir |
||
5 | Replaces: util/dir/HuntnGather.lha |
||
24 | office | 6 | Version: 1.7.3 |
1 | office | 7 | Architecture: m68k-amigaos |
8 | |||
9 | Hunt & Gather - File search and indexing utilities. |
||
10 | (or Hunt'n'Gather bro, ghetto style) |
||
11 | |||
12 | © Copyright 2021 by Wizardry and Steamworks |
||
13 | |||
14 | Released under the MIT License, all rights reserved. |
||
15 | |||
22 | office | 16 | -=:[ Changes ]:=- |
1 | office | 17 | |
26 | office | 18 | TBA: |
31 | office | 19 | * Testing with MuForce. |
30 | office | 20 | * Tested using large entire drives and eliminated some bugs. |
26 | office | 21 | * Use locale for string comparisons. |
22 | * Gather now requires either of -a (add), -r (remove), -c (create). |
||
23 | * Allow specifying multiple paths when gathering. |
||
20 | office | 24 | |
1 | office | 25 | -=:[ Introduction ]:=- |
26 | |||
27 | |||
28 | Hunt and Gather are two utiltities for indexing and then searching |
||
29 | fileswithin a drive or directory designed to speed up searching files. |
||
30 | |||
31 | The Gather utility is meant to index any path and generate a search |
||
32 | database. The Hunt utility will then open the database generated by |
||
33 | Gather and look for files matching the string provided to Hunt as |
||
34 | parameter. |
||
35 | |||
36 | The utility was designed to check large collections of icons but the |
||
37 | indexing and the fast search results proved indispensable enough for a |
||
38 | self-standing program. |
||
39 | |||
40 | -=:[ Design ]:=- |
||
41 | |||
42 | Hunt and Gather are designed with constant memory usage in order to be |
||
43 | suitable for all Amiga models. Namely, the Gather utility will search |
||
44 | all files in a given path, sort the files in ascending order by using |
||
45 | an external merge sort (tailored down to a 256KiB memory limit). |
||
46 | |||
47 | Conversely, Hunt uses brute force to search for files but by reading |
||
48 | lines from the database without loading the entire database in RAM. |
||
49 | Perhaps ulterior versions of Hunt might partition the database file |
||
50 | just like Gather does and then build Tries in oder to speed up finding |
||
51 | files on the filesystem. |
||
52 | |||
53 | The project adheres to the ANSI C standard and Amiga-centric semantics |
||
54 | are compiled conditionally (in case the "___AmigaOS__" macro is |
||
55 | defined at compile time).Otherwise, Hunt & Gather should run under any |
||
56 | platform that benefits from an ANSI C compiler. |
||
57 | |||
58 | -=:[ Usage ]:=- |
||
59 | |||
3 | office | 60 | First the Gather utility is used to index a path: |
1 | office | 61 | |
62 | |||
63 | Gather RAM: |
||
64 | |||
65 | |||
66 | which will create a file in the S: directory named "gahter.db". While |
||
67 | Gather is running, the utility will display the number of indexed |
||
68 | directories and files on the command line. |
||
69 | |||
22 | office | 70 | In order to look for a file, the Hunt utility is invoked with an |
71 | Amiga search pattern: |
||
1 | office | 72 | |
73 | |||
3 | office | 74 | Hunt #?test#? |
1 | office | 75 | |
76 | |||
22 | office | 77 | in this case, "#?test#?", that will be compared to all the files |
78 | indexed previously by Gather. In case any of the files previously |
||
79 | indexed by Gather contain the term "test", then the Hunt utility will |
||
80 | display the path to the file. |
||
1 | office | 81 | |
82 | -=:[ Gather ]:=- |
||
83 | |||
84 | The Gather utility takes one single parameter representing the path |
||
85 | to be indexed; for example, all the following paths are valid: |
||
86 | |||
87 | |||
88 | RAM: |
||
89 | DH0:System/ |
||
90 | |||
91 | |||
92 | When Gather runs, a database is created at "S:gather.db" by |
||
93 | overwriting the previous database. For best results, Gather should |
||
94 | run periodically and should scan a path that is most frequently |
||
95 | searched for files. |
||
96 | |||
97 | -=:[ Hunt ]:=- |
||
98 | |||
99 | Hunt is the counterpart to Gather and will search the database at |
||
100 | "S:gather.db" for files matching the terms passed to Hunt on the |
||
101 | command line. |
||
102 | |||
3 | office | 103 | For instance: |
1 | office | 104 | |
3 | office | 105 | Hunt #?test#? |
1 | office | 106 | |
107 | will search all files in the Gather database "S:gather.db" for the |
||
108 | term "test". If any file within the database partially matches the |
||
109 | term "test", then Hunt will display the path on the command line. |
||
3 | office | 110 | |
111 | Hunt uses Amiga-style pattern for matching the file names. |
||
112 | |||
113 | -=:[ Source ]:=- |
||
1 | office | 114 | |
3 | office | 115 | The project is open sourced and licensed under MIT. The source code |
116 | is included in the AmiNET release or can be checked out via subversion |
||
117 | from the Wizardry and Steamworks repository: |
||
1 | office | 118 | |
3 | office | 119 | svn co http://svn.grimore.org/HuntnGather |
120 | |||
4 | office | 121 | -=:[ Mentions ]:=- |
122 | |||
123 | The code includes a shim for "getopt" in order to process command line |
||
22 | office | 124 | parameters on Amiga without changing the semantics. The shim is |
125 | created by Daniel J. Barrett, barrett@cs.umass.edu and is available on |
||
126 | AmiNET: |
||
4 | office | 127 | |
128 | http://aminet.net/package/dev/misc/GetOpt-1.3 |
||
129 | |||
1 | office | 130 | -=:[ Contact ]:=- |
131 | |||
22 | office | 132 | E-Mail(tor): |
133 | |||
134 | office@3wymlmcsvxiaqzmbepsdawqpk6o2qsk65jhms72qqjulk5u4bgmvs3qd.onion |
||
135 | |||
1 | office | 136 | Website: https://grimore.org/amiga/hunt_and_gather |
22 | office | 137 | Website(tor): |
138 | |||
139 | http://3wymlmcsvxiaqzmbepsdawqpk6o2qsk65jhms72qqjulk5u4bgmvs3qd.onion/ |
||
140 | |||
1 | office | 141 | Discord: https://discord.gg/k9kyDsa |
142 |