xylix / wordcrab

A command-line tool for counting lines, words and characters in documents

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wordcrab

Build Status codecov Maintenance

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 and cargo 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 to wc
  • 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

About

A command-line tool for counting lines, words and characters in documents


Languages

Language:Rust 100.0%