Crates.io | wordle-cli |
lib.rs | wordle-cli |
version | 1.0.1 |
source | src |
created_at | 2022-06-15 22:44:51.491167 |
updated_at | 2022-06-16 16:13:43.721187 |
description | The popular word guessing game as CLI application! Written in Rust. |
homepage | https://www.tohuwabohu.io/projects/wordle-cli |
repository | https://github.com/tohuwabohu-io/wordle-cli |
max_upload_size | |
id | 606781 |
size | 261,408 |
wordle-cli is a wordle inspired word guessing game for the CLI written in rust.
Run the game by executing
cargo run [language]
.
If language
is not set, it defaults to "en"
.
Run the import tool by executing
cargo run --bin import <source-file> <import-language>
.
The player has to correctly guess a randomly selected word from the dictionary. All words are 5 characters long. By coloring single letters the game tells the player about correct letter positioning.
The game ends when the player runs out of guesses or when the player guesses the word correctly. After that, a message is displayed.
The .env
file contains information about the database location.
DATABASE_URL
indicates that the dictionary is located in a given db urlThe import tool can be used to expand the word base. Usage: See Usage above.
However, the requirements for the file underneath the <file_path>
argument are as follows:
The tool automatically removes duplicates and entries with a size different from 5 characters and converts unicode characters to ASCII using any_ascii. German umlauts receive a special treatment.
If you choose to set up a database to serve as dictionary, please take a closer look at the diesel.rs documentation. You need a working diesel_cli installation to proceed.
Step 1: Run the diesel initialization.
diesel setup
Step 2: Create a diesel migration.
diesel create dictionary_migration
Step 3: Navigate to the res/db folder.
create.sql
and drop.sql
should be put into the diesel migration's up.sql
and down.sql
. Those files are excluded from the crate.
Step 4: Import your dictionary into the database.
cargo run -- import --source-file=dictionary.txt --import-language=en
Et voilĂ ! Enjoy additional features. A correctly guessed word will be marked as guessed
in the database and won't show up a second time. The first randomly selected word of the day will re-occur upon starting the game on the same day, until it has been guessed successfully.