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