Skip to content

Commit 5da1c13

Browse files
authored
Update README.md
1 parent d0e9f30 commit 5da1c13

File tree

1 file changed

+43
-37
lines changed

1 file changed

+43
-37
lines changed

README.md

+43-37
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,58 @@
1-
# NATS is a basic plain text file scanner.
2-
> **Usage:** NATS -P path -K keyword [Search Type] [options]
1+
# NATS - Plain Text File Scanner
32

3+
NATS is a basic plain text file scanner tool that allows you to search for keywords within text files. It provides various search options and can be used in both command-line and GUI versions available for Windows, Mac, and Linux.
44

55
## License Information
66

7-
- NATS - [MIT](https://github.com/liukonen/nats/blob/master/LICENSE), Copyright 2020 [Luke Liukonen](https://github.com/liukonen)
8-
- [System.Data.OLEDB](https://github.com/dotnet/corefx) - [MIT](https://licenses.nuget.org/MIT), Copyright Microsoft Corp - For use in Windows Index Scan
9-
- [System.Data.Sqllite.Core](https://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki) [-Public Domain](https://www.sqlite.org/copyright.html), D. Richard Hipp - Used for NATS Index Backend Database
10-
- [Farmhash.Sharp](https://nickbabcock.github.io/Farmhash.Sharp/) - [MIT](https://github.com/nickbabcock/Farmhash.Sharp/blob/master/LICENSE.txt), Copyright (c) 2015 Nick Babcock - Copyright (c) 2014 Google, Inc. For use in generating hash values for Indexes
11-
- [Material.IO Apache License]("https://www.apache.org/licenses/LICENSE-2.0.html") - Icon for mac and windows provided by material.io, and is Apache license version 2.0
7+
- NATS: [MIT License](https://github.com/liukonen/nats/blob/master/LICENSE), © 2020 [Luke Liukonen](https://github.com/liukonen)
8+
- System.Data.OLEDB: [MIT License](https://licenses.nuget.org/MIT), © Microsoft Corp - Used for Windows Index Scan
9+
- System.Data.Sqllite.Core: Public Domain, © D. Richard Hipp - Used for NATS Index Backend Database
10+
- Farmhash.Sharp: [MIT License](https://github.com/nickbabcock/Farmhash.Sharp/blob/master/LICENSE.txt), © 2015 Nick Babcock and © 2014 Google, Inc. - Used for generating hash values for Indexes
11+
- Material.IO Apache License: [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html) - Icon for Mac and Windows provided by material.io
1212

13-
## Required Fields
14-
-K [keyword] Keyword text to search for
15-
-P [path] Dirrectory path to search through
16-
13+
## Usage (command line)
14+
```bash
15+
NATS -P path -K keyword [Search Type] [options]
16+
```
1717

18-
## Search Types
18+
## Required Fields
19+
20+
- `-K [keyword]`: Keyword text to search for
21+
- `-P [path]`: Directory path to search through
22+
23+
## Search Types
1924

2025
| Param | Meaning |
2126
|-------|---------|
22-
| -T[X] | **Threading:** Not setting the value indicates a single thread search. -T Implements Multithreading Scanning, with X being the number of Threads. If not set, single thread is used. If [X] is empty, it will be set to 4 threads.|
23-
| -I | **Index:** Will generate or refresh NATS Sqlite DB based on the directory given. It will then search said index for any matching keywords in files, and scan that file for a match to the phrase supplied.|
24-
| -L | **Limited:** Performs the same search as Index, but will not generate or refresh its index.|
25-
| -B | **Build:** Indexes on a directory only. A keyword needs to be passed but is not used in the action of indexing. Indexing also defaults to a hard coded set of file types that are whitelisted, blacklisted, and used "Smart Search" in order to scan the files. There is a chance Indexing will not always pick up on text files.|
26-
| -W | **Windows Index:** uses Windows build in Indexing engine to find files. Indexing must be turned on, and set in the folder you want to search through in order for this to work.|
27+
| -T[X] | **Threading:** Not setting the value indicates a single-thread search. -T implements multithreaded scanning, where X is the number of threads. If not set, a single thread is used. If [X] is empty, it defaults to 4 threads. |
28+
| -I | **Index:** Generates or refreshes a NATS SQLite DB based on the given directory. It searches the index for matching keywords in files and scans those files for matching phrases. |
29+
| -L | **Limited:** Performs the same search as Index but does not generate or refresh the index. |
30+
| -B | **Build:** Indexes a directory only. A keyword needs to be passed but is not used in the indexing process. The indexing defaults to a hardcoded set of file types that are whitelisted, blacklisted, and utilize "Smart Search" to scan the files. Note: There is a chance that indexing may not always pick up text files. |
31+
| -W | **Windows Index:** Uses the Windows built-in indexing engine to find files. Indexing must be turned on and set in the folder you want to search through for this option to work. |
2732

2833
## Options
34+
2935
| Param | Meaning |
3036
|----------|---------|
31-
| -S | **Smart Search:** uses the byte order mark at the start of the file to assist in filtering out non text files. This process is not 100% accurate, however is set for index based search.|
32-
| -R | **RAM:** Loads files under 10MB into Ram for comparison. This in theory should reduce IO spikes on the System process on non indexed searches. Does Not work the the -L command.|
33-
| -O[path] | **Output:** Will output the command to the specified path file|
34-
| -D [ext] | **Disapproved Extensions:** Implements filtering of file extensions not to scan. Multiple extensions will be deliminated with the | symbol. NAPS has a default blacklist of [7z|bmp|db|db-journal|dll|doc|docx|exe|jpg|m4v|mov|mp3|mp4|pdb|pdf|png|tmp|xls|xlsx|zip] and invoking this will override the default|
35-
| -A [ext] | **Approved Extensions:** The reverse of the disapproved extension, which is disabled if -A is sent. Will only search files with the particular extension.|
36-
| -M | **MultiLine:** By default NATS will only indicate if the file contains the selected keyword. Adding the M keyword on Single or Multi thread scan will indicate What lines in the file the keyword appears as well (Note: this search will take longer as it needs to read through the entire file for keywords)|
37-
| -H | **Help:** Ignores all other Inputs and displays this help file|
38-
37+
| -S | **Smart Search:** Uses the byte order mark at the start of the file to assist in filtering out non-text files. This process is not 100% accurate but is used for index-based searches. |
38+
| -R | **RAM:** Loads files under 10MB into RAM for comparison. This theoretically reduces IO spikes on the system process during non-indexed searches. Does not work with the -L command. |
39+
| -O[path] | **Output:** Outputs the command to the specified path file. |
40+
| -D [ext] | **Disapproved Extensions:** Filters out file extensions not to scan. Multiple extensions should be delimited with the "|" symbol. NATS has a default blacklist of [7z, bmp, db, db-journal, dll, doc, docx, exe, jpg, m4v, mov, mp3, mp4, pdb, pdf, png, tmp, xls, xlsx, zip], and using this option will override the defaults. |
41+
| -A [ext] | **Approved Extensions:** The reverse of the disapproved extension, which is disabled if -A is used. Only searches files with the specified extension. |
42+
| -M | **MultiLine:** By default, NATS indicates if the file contains the selected keyword. Adding the M keyword during single or multithreaded scan will also indicate the lines in the file where the keyword appears (Note: this search takes longer as it needs to read through the entire file for keywords). |
43+
| -H | **Help:** Ignores all other inputs and displays the help file. |
3944

4045
## Other
41-
|Design patterns or technologies explored|
42-
|--|
43-
| - Singleton |
44-
| - Factory Pattern|
45-
| - Parallel Library|
46-
| - Sqlite db |
47-
| - String Hashing |
48-
|- Cocoa (Mac OS) Development|
49-
|- XCode |
50-
|- GTK#|
51-
|- .Net Standard|
52-
|- Cross Platform Development|
46+
47+
Design patterns or technologies explored:
48+
- Singleton
49+
- Factory Pattern
50+
- Parallel Library
51+
- SQLite DB
52+
- String Hashing
53+
- Cocoa (Mac OS) Development
54+
- XCode
55+
- GTK#
56+
- .NET Standard
57+
- Cross-Platform Development
58+

0 commit comments

Comments
 (0)