#command-line #library #program #game #cli

bin+lib spellingbee

Generate potential solutions for the NYT spelling bee game

3 releases (1 stable)

1.0.0 May 14, 2022
0.3.0 May 11, 2022
0.2.0 May 10, 2022

#8 in #program

Apache-2.0

15KB
192 lines

Spellingbee

CI build state code license Crate version

Spellingbee is a command line program (and reusable library) for discovering answers to the daily NYT spelling bee challenge. It also shows each answer's score and highlights any pangram answers.

Installation

Use Rust's cargo tool to install Spellingbee.

$ cargo install spellingbee
$ spellingbee o cbiprt     # if $PATH contains `~/.cargo/bin`

Please contact me or create a new issue if you would like to have downloadable installers for your platform rather than use cargo.

Usage

Command line

Spellingbee can be invoked on the command line once it is installed. Simply pass the required letter as the first argument, and then all of the other letters as the second argument.

You can also use the -d path/to/dictionary if you would like to use an alternative word list. The default world list uses your operating system's dictionary which contains many more words than the NYT spelling bee game will accept.

For additional information on using the command line tool invoke the tool like this: spellingbee --help.

Library

Spellingbee is also available as a reusable Rust library. The latest API documentation is available from a link on spellingbee's crates.io page.

Generally all you need is the check_word function, as seen here in this example:

use spellingbee::check_word;
assert!(check_word("loon", 'o', "unrlap").is_some());

Building

Make sure you install Rust on your computer before building.

$ git clone git@github.com:smacdo/spellingbee.git
$ cd spellingbee
$ cargo test
$ cargo run -- o cbiprt

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Dependencies

~3MB
~59K SLoC