wallpaper_dl/
wallpaper-dl.rs1use apputils::config::{Cfg, Appdata};
2use apputils::{paint, paintln, Colors};
3
4const APP_NAME: &str = "wallpaper-dl";
5const CONFIG_FILE: &str = "config.toml";
6const DB_FILE: &str = "wallpapers.toml";
7
8fn main() {
9 paint!(Colors::Green, "Your wallpaper-dl config: ");
10 match Cfg::read(APP_NAME, CONFIG_FILE) {
11 Err(_) => paintln!(Colors::YellowBold, "Not found"),
12 Ok(x) => println!("\n{x}")
13 }
14
15 println!("\n{}\n", "=".repeat(36));
16
17 paint!(Colors::Blue, "Your wallpaper database: ");
18 match Appdata::read_str(APP_NAME, DB_FILE) {
19 Err(_) => paintln!(Colors::RedBold, "Not found"),
20 Ok(x) => println!("\n{x}")
21 }
22}