trello-to-deck/src/lib.rs
Paul Campbell d5055c50cc
Some checks failed
Test / build (map[name:stable]) (push) Successful in 7m1s
Test / build (map[name:nightly]) (push) Successful in 2m53s
Release Please / Release-plz (push) Failing after 23s
feat: parse command line
2024-12-12 17:31:31 +00:00

47 lines
958 B
Rust

//
use std::path::PathBuf;
use clap::Parser;
use kxio::{fs::FileSystem, net::Net};
mod macros;
#[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 => todo!("init"),
Command::Check => todo!("check"),
Command::Import => todo!("import"),
};
// Ok(())
}