2020-05-21 06:03:38 +00:00
|
|
|
use clap::{App, ArgMatches, SubCommand};
|
|
|
|
use domasi::pomodoro::Config;
|
|
|
|
use domasi::Pomodoro;
|
2020-05-21 04:04:31 +00:00
|
|
|
fn main() {
|
2020-05-21 06:03:38 +00:00
|
|
|
let matches = App::new("Domasi")
|
|
|
|
.version("0.1.0")
|
|
|
|
.author("paoda <musukarekai@gmail.com>")
|
|
|
|
.about("Yet another pomodoro timer.")
|
|
|
|
.subcommand(SubCommand::with_name("start").about("Start the Pomodoro Timer"))
|
|
|
|
.get_matches();
|
|
|
|
|
|
|
|
match matches.subcommand() {
|
|
|
|
("start", Some(args)) => start(args),
|
|
|
|
_ => {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[tokio::main]
|
|
|
|
pub async fn start(_args: &ArgMatches) {
|
|
|
|
let mut pomodoro = Pomodoro::default();
|
|
|
|
let config = Config::default();
|
|
|
|
|
|
|
|
pomodoro.start(config).await;
|
2020-05-21 04:04:31 +00:00
|
|
|
}
|