Skip to content

Commit

Permalink
On second thought..
Browse files Browse the repository at this point in the history
  • Loading branch information
PsychedelicShayna committed Sep 14, 2024
1 parent 35f8a48 commit 9844fa6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ The SHA2 family and MD5 is also supported but that's only there for compatibilit
## Usage

```
A CLI frontend to jwalk for blazingly fast filesystem traversal!
Usage: jw [OPTIONS] [directories]...
Arguments:
Expand All @@ -39,12 +41,13 @@ Options:
Display results in realtime, rather than collecting first and displaying later.
This will result in a significant drop in performance due to the constant terminal output.
-c, --csum
-c, --checksum
Output an index containing the hash of every file using the specified algorithm.
Uses the default algorithm. To specify one use --calgo. Note: specifying --calgo makes this redundant.
Uses the default algorithm. To specify one use --calgo.
Note: specifying --calgo makes this redundant.
-C, --calgo <algorithm>
Performs --csum but with the specified hashing algorithm.
-C, --checksum-with <algorithm>
Performs --checksum but with the specified hashing algorithm.
Using xxh3 is the recommended choice. Unless you have a reason to use something else,
stick with the default. SHA2 and MD5 are provided for compatibility with other tools
and existing data. If you're only using jw, you stand to gain a large increase in
Expand All @@ -53,11 +56,6 @@ Options:
[default: xxh3]
[possible values: xxh3, sha224, sha256, sha384, sha512, md5]
-t, --threads <count>
The number of threads to use to hash files in parallel.
[default: 1]
-D, --diff <file1> <file2>...
Validate hashes from two or more files containing output from `jw --checksum`
The first file will be treated as the "correct" one; any discrepant hashes
Expand All @@ -75,6 +73,9 @@ Options:
[possible values: files, dirs, dot, other]
-S, --silent
Suppress output, useful for benchmarking, or just counting files via --stats
-s, --stats
Count the number of files, dirs, and other entries, and print at the end.
This will decrease performance. Unnoticeable in most cases, but the more
Expand Down
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,23 +326,23 @@ fn main() {
This will result in a significant drop in performance due to the constant terminal output."))

.arg(Arg::new("checksum")
.long("csum")
.long("checksum")
.short('c')
.action(ArgAction::SetTrue)
.help("Output an index containing the hash of every file using the specified algorithm.")
.long_help("Output an index containing the hash of every file using the specified algorithm.
Uses the default algorithm. To specify one use --calgo. Note: specifying --calgo makes this redundant."))

.arg(Arg::new("checksum-algo")
.long("calgo")
.long("checksum-with")
.short('C')
.value_parser(["xxh3", "sha224", "sha256", "sha384", "sha512", "md5"])
.default_value("xxh3")
.ignore_case(true)
.value_name("algorithm")
.default_value("xxh3")
.help("Performs --csum but with the specified hashing algorithm.")
.long_help("Performs --csum but with the specified hashing algorithm.
.help("Performs --checksum but with the specified hashing algorithm.")
.long_help("Performs --checksum but with the specified hashing algorithm.
Using xxh3 is the recommended choice. Unless you have a reason to use something else,
stick with the default. SHA2 and MD5 are provided for compatibility with other tools
and existing data. If you're only using jw, you stand to gain a large increase in
Expand Down

0 comments on commit 9844fa6

Please sign in to comment.