use clap::{command, Parser, Subcommand}; use crate::{ modules::random_imgur::{RandomImgurSubcommand}, }; #[derive(Parser, Clone)] #[command(author = "pcranaway", about = "multithreaded web archiver")] pub struct Yuki { /// Amount of threads that should be used #[arg(short = 't', default_value = "2", global = true, required = false)] pub threads: i8, /// Path to the directory where the downloaded files should be saved #[arg(short = 'o', default_value = "", global = true, required = false)] pub output: String, #[command(subcommand)] pub command: Root, } #[derive(Subcommand, Clone)] pub enum Root { /// Runs a module Run { #[command(subcommand)] command: Modules, }, } #[derive(Subcommand, Clone)] pub enum Modules { RandomImgur(RandomImgurSubcommand), }