| Crates.io | gen_alpha_dictionary |
| lib.rs | gen_alpha_dictionary |
| version | 0.1.1 |
| created_at | 2024-12-29 00:06:57.798314+00 |
| updated_at | 2024-12-29 10:23:17.839214+00 |
| description | Gives you the description of common gen-alpha words |
| homepage | https://github.com/crnicholson/gen_alpha_dictionary |
| repository | https://github.com/crnicholson/gen_alpha_dictionary |
| max_upload_size | |
| id | 1497840 |
| size | 48,999 |
Easily learn gen-alpha (or, as found in the wild, iPad kids) phrases with a Rust Command Line Interface (CLI) and a hand-compiled list of 250 common words and prashes of your favorite 10-year-old.
[dependencies]
gen_alpha_dictionary = "0.1.0"
Import:
use std::process;
use serde_json::Value;
use gen_alpha_dictionary::dictionary;
Parse JSON from web:
let dict: Value = dictionary::parse_web_json("https://raw.githubusercontent.com/crnicholson/gen_alpha_dictionary/refs/heads/master/dict.json").unwrap_or_else(|err| {
if err.to_string().contains("status code 500") {
println!("Problem fetching JSON data.")
} else {
println!("Problem parsing dictionary: {err}");
}
process::exit(1);
});
Or, parse JSON locally:
let dict: Value = dictionary::parse_local_json("dict.json").unwrap_or_else(|err| {
println!("Problem parsing dictionary: {err}");
process::exit(1);
});
And finally, get the definition of the word:
let result = dictionary::define_word(&dict, &word).unwrap_or_else(|err | {
println!("{err}");
process::exit(1);
});
Install:
git clone https://github.com/crnicholson/gen_alpha_dictionary.git
cd gen_alpha_dictionary
Run:
cargo run -- "skibid"
This will find the definition of skibidi. Double qoutes are unnecessary for single word prashes.
Licensed under MIT. Copyright 2024 Charles Nicholson.