feat: parse command line
This commit is contained in:
parent
41246c27ac
commit
d5055c50cc
2 changed files with 17 additions and 7 deletions
13
src/lib.rs
13
src/lib.rs
|
@ -32,3 +32,16 @@ impl Default for Ctx {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(test, mutants::skip)]
|
||||||
|
pub async fn run(_ctx: Ctx) -> color_eyre::Result<()> {
|
||||||
|
color_eyre::install()?;
|
||||||
|
|
||||||
|
let commands = Commands::parse();
|
||||||
|
match commands.command {
|
||||||
|
Command::Init => todo!("init"),
|
||||||
|
Command::Check => todo!("check"),
|
||||||
|
Command::Import => todo!("import"),
|
||||||
|
};
|
||||||
|
// Ok(())
|
||||||
|
}
|
||||||
|
|
11
src/main.rs
11
src/main.rs
|
@ -3,17 +3,14 @@ use std::path::PathBuf;
|
||||||
|
|
||||||
use color_eyre::Result;
|
use color_eyre::Result;
|
||||||
|
|
||||||
use trello_to_deck::Ctx;
|
use trello_to_deck::{run, Ctx};
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
#[cfg_attr(test, mutants::skip)]
|
#[cfg_attr(test, mutants::skip)]
|
||||||
async fn main() -> Result<()> {
|
async fn main() -> Result<()> {
|
||||||
color_eyre::install()?;
|
run(Ctx {
|
||||||
|
|
||||||
let _ctx = Ctx {
|
|
||||||
fs: kxio::fs::new(PathBuf::default()),
|
fs: kxio::fs::new(PathBuf::default()),
|
||||||
net: kxio::net::new(),
|
net: kxio::net::new(),
|
||||||
};
|
})
|
||||||
|
.await
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue