25 lines
651 B
Rust
25 lines
651 B
Rust
use clap::{App, ArgMatches, SubCommand};
|
|
use domasi::pomodoro::Config;
|
|
use domasi::Pomodoro;
|
|
fn main() {
|
|
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;
|
|
}
|