Crates.io | word_counter |
lib.rs | word_counter |
version | 0.3.0 |
source | src |
created_at | 2021-08-21 17:35:42.099473 |
updated_at | 2021-09-02 18:55:49.16522 |
description | A program that displays word count of a file. |
homepage | |
repository | https://github.com/tasnimAlam/word_counter |
max_upload_size | |
id | 440400 |
size | 20,268 |
A program that displays word count of a file.
# Cargo
cargo install word_counter
# Homebrew
brew tap tasnimAlam/word-counter
brew install tasnimAlam/word-counter/word_counter
$ ./word_counter poem.txt --top 4 --search lover --max --duration
+---------------+-------+---+
| Search result | lover | 3 |
+---------------+-------+---+
+---------------+-----+---+
| Maximum count | the | 4 |
+---------------+-----+---+
+-------+-------+
| Word | Count |
+-------+-------+
| the | 4 |
+-------+-------+
| and | 3 |
+-------+-------+
| God | 3 |
+-------+-------+
| lover | 3 |
+-------+-------+
Duration : 2ms
$ ./word_counter --help
A program that displays word count of a file.
USAGE:
word_counter [FLAGS] [OPTIONS] <input>
FLAGS:
-d, --duration Duration of all the calculations
-h, --help Prints help information
-r, --reverse Reverse order
-m, --max Show most counted word
-V, --version Prints version information
OPTIONS:
-o, --output <output> Output file
-s, --search <search> Search specific word
-t, --top <top> Top result limit [default: 10]
ARGS:
<input> Input file