18 releases (breaking)
0.13.0 | Jun 23, 2023 |
---|---|
0.12.0 | Jan 25, 2021 |
0.11.1 | Jun 19, 2020 |
0.11.0 | Feb 4, 2020 |
0.10.2 | Oct 18, 2019 |
#2114 in Command line utilities
280KB
181 lines
wordcrab
wordcrab
is a command-line tool for counting lines, words and characters in documents.
It is intended as a cross-platform, modern replacement for wc
.
Installation
- Make sure you have
rustup
andcargo
installed:curl https://sh.rustup.rs -sSf | sh
cargo install wordcrab
- Upgrading:
cargo install wordcrab --force
- Uninstalling:
cargo remove wordcrab
TODO: installers in various OS package managers.
Goals
- MVP version that counts lines, words and characters
- Publish on <crates.io>
- Publish on homebrew
- Publish on other platforms, which?
- Write a blogpost about the process of making this; as a showcase of creating and publishing a tool
- Optional JSON output format
- Optional YAML output format
- Optional TOML output format
- Concurrency with
rayon
- Benchmark & write a blogpost about the process of benchmarking a simple tool
- More options:
-l
,-w
,-c
similar towc
- Testing
- Tiny initial tests
- Lots of tests to ensure correctness of various functions
- Test output formatting
- Test tricky strings
- Full code coverage
- Soft error handling; do not panic if a single file fails to be read of a long list
- Serialization error handling; currently panics. How to type
main()
and return errors? - Async-std port, when async/await lands in stable?
- CI builds
Dependencies
~5.5MB
~109K SLoC