HuntnGather – Diff between revs 14 and 16

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