HuntnGather – Blame information for rev 1
?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 |
||
6 | Version: 1.0 |
||
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 | |||
16 | -=:[ ChangeLog ]:=- |
||
17 | |||
18 | 20210107: |
||
19 | |||
20 | * Add the quiet option (-q) to the Gather tool. |
||
21 | * Process arguments cannonically for both Hunt & Gather. |
||
22 | * Switch to a case-insensitive search for Hunt. |
||
23 | |||
24 | 20210105: |
||
25 | |||
26 | * Ensure the database is sorted for future development. |
||
27 | * Insert CTRL+C breaking of both tools for AmigaOS. |
||
28 | * Make both tools more verbose. |
||
29 | * Dot the is, dash the ts... |
||
30 | |||
31 | -=:[ Introduction ]:=- |
||
32 | |||
33 | |||
34 | Hunt and Gather are two utiltities for indexing and then searching |
||
35 | fileswithin a drive or directory designed to speed up searching files. |
||
36 | |||
37 | The Gather utility is meant to index any path and generate a search |
||
38 | database. The Hunt utility will then open the database generated by |
||
39 | Gather and look for files matching the string provided to Hunt as |
||
40 | parameter. |
||
41 | |||
42 | The utility was designed to check large collections of icons but the |
||
43 | indexing and the fast search results proved indispensable enough for a |
||
44 | self-standing program. |
||
45 | |||
46 | -=:[ Design ]:=- |
||
47 | |||
48 | Hunt and Gather are designed with constant memory usage in order to be |
||
49 | suitable for all Amiga models. Namely, the Gather utility will search |
||
50 | all files in a given path, sort the files in ascending order by using |
||
51 | an external merge sort (tailored down to a 256KiB memory limit). |
||
52 | |||
53 | Conversely, Hunt uses brute force to search for files but by reading |
||
54 | lines from the database without loading the entire database in RAM. |
||
55 | Perhaps ulterior versions of Hunt might partition the database file |
||
56 | just like Gather does and then build Tries in oder to speed up finding |
||
57 | files on the filesystem. |
||
58 | |||
59 | The project adheres to the ANSI C standard and Amiga-centric semantics |
||
60 | are compiled conditionally (in case the "___AmigaOS__" macro is |
||
61 | defined at compile time).Otherwise, Hunt & Gather should run under any |
||
62 | platform that benefits from an ANSI C compiler. |
||
63 | |||
64 | -=:[ Usage ]:=- |
||
65 | |||
66 | First the Gather utility is used to index a path: |
||
67 | |||
68 | |||
69 | Gather RAM: |
||
70 | |||
71 | |||
72 | which will create a file in the S: directory named "gahter.db". While |
||
73 | Gather is running, the utility will display the number of indexed |
||
74 | directories and files on the command line. |
||
75 | |||
76 | In order to look for a file, the Hunt utility is invoked with a search |
||
77 | term: |
||
78 | |||
79 | |||
80 | Hunt test |
||
81 | |||
82 | |||
83 | in this case, "test", that will be compared to all the files indexed |
||
84 | previously by Gather. In case any of the files previously indexed by |
||
85 | Gather contain the term "test", then the Hunt utility will display |
||
86 | the path to the file. |
||
87 | |||
88 | -=:[ Gather ]:=- |
||
89 | |||
90 | The Gather utility takes one single parameter representing the path |
||
91 | to be indexed; for example, all the following paths are valid: |
||
92 | |||
93 | |||
94 | RAM: |
||
95 | DH0:System/ |
||
96 | |||
97 | |||
98 | When Gather runs, a database is created at "S:gather.db" by |
||
99 | overwriting the previous database. For best results, Gather should |
||
100 | run periodically and should scan a path that is most frequently |
||
101 | searched for files. |
||
102 | |||
103 | -=:[ Hunt ]:=- |
||
104 | |||
105 | Hunt is the counterpart to Gather and will search the database at |
||
106 | "S:gather.db" for files matching the terms passed to Hunt on the |
||
107 | command line. |
||
108 | |||
109 | For instance: |
||
110 | |||
111 | Hunt test |
||
112 | |||
113 | will search all files in the Gather database "S:gather.db" for the |
||
114 | term "test". If any file within the database partially matches the |
||
115 | term "test", then Hunt will display the path on the command line. |
||
116 | |||
117 | -=:[ Mentions ]:=- |
||
118 | |||
119 | My boss spilled the data of 800+ employees. |
||
120 | I called him out and left. |
||
121 | |||
122 | Supporting Romania is like giving a gun to a monkey. |
||
123 | |||
124 | -=:[ Contact ]:=- |
||
125 | |||
126 | E-Mail(tor): office@kaarvixjxfdy2wv2.onion |
||
127 | Website: https://grimore.org/amiga/hunt_and_gather |
||
128 | Website(tor): http://kaarvixjxfdy2wv2.onion |
||
129 | Discord: https://discord.gg/k9kyDsa |
||
130 |