This commit is contained in:
Quaternions 2024-12-26 15:46:56 -08:00
parent e9e51d455b
commit 4b99f2028d
2 changed files with 29 additions and 26 deletions

26
src/cmd/mod.rs Normal file

@ -0,0 +1,26 @@
use clap::{Args,Parser,Subcommand};
#[derive(Parser)]
#[command(author,version,about,long_about=None)]
#[command(propagate_version=true)]
pub struct Cli{
#[command(subcommand)]
command:Commands,
}
#[derive(Subcommand)]
pub enum Commands{
Review(ReviewCommand),
UploadScripts(UploadScriptsCommand),
}
#[derive(Args)]
struct ReviewCommand{
#[arg(long)]
cookie:String,
}
#[derive(Args)]
struct UploadScriptsCommand{
#[arg(long)]
session_id:PathBuf,
}

@ -1,31 +1,8 @@
use clap::{Args,Parser,Subcommand};
mod cmd;
use cmd::{Cli,Commands};
use futures::{StreamExt,TryStreamExt};
#[derive(Parser)]
#[command(author,version,about,long_about=None)]
#[command(propagate_version=true)]
struct Cli{
#[command(subcommand)]
command:Commands,
}
#[derive(Subcommand)]
enum Commands{
Review(ReviewCommand),
UploadScripts(UploadScriptsCommand),
}
#[derive(Args)]
struct ReviewCommand{
#[arg(long)]
cookie:String,
}
#[derive(Args)]
struct UploadScriptsCommand{
#[arg(long)]
session_id:PathBuf,
}
#[tokio::main]
async fn main(){
let cli=Cli::parse();