First levels v0.1.0
This commit is contained in:
@@ -1,3 +1,21 @@
|
||||
fn main() -> anyhow::Result<()> {
|
||||
yamlabyrinth::tui::run()
|
||||
use anyhow::Result;
|
||||
use clap::Parser;
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(name = "go", about = "Traverse the YAML labyrinth")]
|
||||
struct Cli {
|
||||
/// Wipe progress and exit.
|
||||
#[arg(long)]
|
||||
reset: bool,
|
||||
}
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let cli = Cli::parse();
|
||||
if cli.reset {
|
||||
let _ = std::fs::remove_file(yamlabyrinth::progress::save_path());
|
||||
println!("Progress wiped.");
|
||||
return Ok(());
|
||||
}
|
||||
let mut prog = yamlabyrinth::progress::load()?;
|
||||
yamlabyrinth::tui::run(&mut prog)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user