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