| Crates.io | apputils |
| lib.rs | apputils |
| version | 0.1.6 |
| created_at | 2024-03-10 12:58:30.883161+00 |
| updated_at | 2024-04-04 01:49:00.629023+00 |
| description | A lightweight Rust crate to help you build awesome tools |
| homepage | https://github.com/Stridsvagn69420/apputils |
| repository | https://github.com/Stridsvagn69420/apputils.git |
| max_upload_size | |
| id | 1168676 |
| size | 16,719 |
A lightweight Rust crate to help you build awesome tools
Check out the docs to know what it can do. To add it to your dependencies, either run:
cargo add apputils
Or update your Cargo.toml:
[dependencies]
apputils = "0.1.5"
dirs: User directories using environment variablesconfig: Config file helpersAn example
use apputils::config::local_file;
use apputils::Colors;
use apputils::paintln;
fn main() {
paintln!(Colors::Rgb(42, 164, 69), "Attempting to read alacritty config file...");
match local_file("alacritty", "alacritty.toml") {
Ok(data) => println!("Your alacritty config:\n{}", data),
Err(_) => paintln!(Colors::Red, "You don't seem to have an alacritty config!")
}
// You can also print with bold colors
paintln!(Colors::MagentaBold, "I use Gentoo, btw.");
}