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