// use std::path::PathBuf; use clap::Parser; use kxio::{fs::FileSystem, net::Net}; mod init; mod macros; mod template; #[cfg(test)] mod tests; pub const NAME: &str = "trello-to-deck"; #[derive(Parser, Debug)] #[clap(version = clap::crate_version!(), author = clap::crate_authors!(), about = clap::crate_description!())] struct Commands { #[clap(subcommand)] command: Command, } #[derive(Parser, Debug)] enum Command { Init, Check, Import, } #[derive(Clone)] pub struct Ctx { pub fs: FileSystem, pub net: Net, } impl Default for Ctx { fn default() -> Self { Self { fs: kxio::fs::new(PathBuf::default()), net: kxio::net::new(), } } } #[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 => init::run(&ctx)?, Command::Check => todo!("check"), Command::Import => todo!("import"), }; Ok(()) }