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