2022-04-03 19:01:58 +00:00
|
|
|
use imgurs::ImgurClient;
|
2022-01-22 21:02:51 +00:00
|
|
|
use simple_logger::SimpleLogger;
|
|
|
|
|
2022-04-03 19:11:11 +00:00
|
|
|
mod cli;
|
|
|
|
mod config;
|
|
|
|
|
2022-01-22 21:02:51 +00:00
|
|
|
#[tokio::main]
|
|
|
|
async fn main() {
|
2022-01-27 13:14:46 +00:00
|
|
|
SimpleLogger::new().init().expect("init SimpleLogger");
|
|
|
|
better_panic::install();
|
2022-01-22 21:02:51 +00:00
|
|
|
|
2022-04-03 19:11:11 +00:00
|
|
|
// parse config file
|
2022-01-24 22:15:55 +00:00
|
|
|
let config = config::toml::parse();
|
2022-01-22 21:02:51 +00:00
|
|
|
|
2022-04-03 19:11:11 +00:00
|
|
|
// create imgur client
|
2022-05-18 17:48:39 +00:00
|
|
|
let client = ImgurClient::new(&config.imgur.id);
|
2022-04-03 19:11:11 +00:00
|
|
|
|
|
|
|
cli::parse(client).await
|
2022-01-22 21:02:51 +00:00
|
|
|
}
|