updated CLI

This commit is contained in:
thePR0M3TH3AN
2025-05-15 16:37:59 -04:00
parent 84df958978
commit a38f613a79
13 changed files with 443 additions and 57 deletions

26
src/cli/coll.rs Normal file
View File

@@ -0,0 +1,26 @@
// src/cli/coll.rs
use clap::{Subcommand, Args};
use rusqlite::Connection;
use crate::cli::Format;
#[derive(Subcommand, Debug)]
pub enum CollCmd {
Create(CreateArgs),
Add (AddArgs),
List (ListArgs),
}
#[derive(Args, Debug)]
pub struct CreateArgs { pub name: String }
#[derive(Args, Debug)]
pub struct AddArgs { pub name: String, pub file_pattern: String }
#[derive(Args, Debug)]
pub struct ListArgs { pub name: String }
pub fn run(cmd: &CollCmd, conn: &mut Connection, format: Format) -> anyhow::Result<()> {
match cmd {
CollCmd::Create(a) => todo!("coll create {:?}", a),
CollCmd::Add(a) => todo!("coll add {:?}", a),
CollCmd::List(a) => todo!("coll list {:?}", a),
}
}