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