Crates.io | cat-ascii-faces |
lib.rs | cat-ascii-faces |
version | 0.1.5 |
source | src |
created_at | 2023-10-06 19:00:42.15425 |
updated_at | 2024-02-29 23:20:25.247471 |
description | A library to generate random ASCII cat faces + binary to print them out |
homepage | |
repository | https://github.com/blyxyas/cat-ascii-faces |
max_upload_size | |
id | 995324 |
size | 10,639 |
This crate provides two packages, a library and a binary.
You can install the library on your project using the following command:
cargo add cat_ascii_faces
Then, you can use it however you'd like:
use cat_ascii_faces::Cats;
fn main() {
let cats = Cats::new();
// Print some random cats
println!("{}", cats.cat()); // (=^・ェ・^=)
println!("{}", cats.cat()); // ฅ(⌯͒• ɪ •⌯͒)ฅ❣
println!("{}", cats.cat()); // o(=・ω・=o)
// Print all cats (will print explicit Unicode because we're using the debug print "{:#?}")
println!("{:#?}", Cats::all()); // [ ... ]
}
The binary is even simpler :sparkles:
cargo install cat-ascii-faces
$ cargo cat --help
cargo-cat is a tool to print cats to the terminal (=^・ェ・^=)
Usage:
cargo cat [OPTIONS]
Options:
--help, -h Print this help message
--all, -a Print all cats
If no option is provided, `cargo cat` will print a random cat face.
Note that the cat may render slightly different depending on the terminal.