trello-to-deck/src/lib.rs

48 lines
958 B
Rust
Raw Normal View History

//
use std::path::PathBuf;
2024-12-01 07:13:23 +00:00
use clap::Parser;
use kxio::{fs::FileSystem, net::Net};
2024-11-29 17:43:49 +00:00
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(),
}
}
}
2024-11-29 14:31:40 +00:00
#[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(())
}