use clap::Parser;
use clap::Subcommand;
#[derive(Parser, Debug)]
#[command(
name = "clap_doc_generator",
version,
about = "Extract clap CLI definitions from Rust source code and generate documentation or language bindings"
)]
pub struct Args {
#[command(subcommand)]
pub command: Commands,
#[arg(short, long, global = true, default_value = ".")]
pub directory: String,
#[arg(short, long, global = true)]
pub recursive: bool,
}
#[derive(Subcommand, Debug)]
pub enum Commands {
#[cfg(feature = "markdown")]
Markdown {
#[arg(long, default_value = "readme.md")]
name: String,
#[arg(long, default_value = "<!-- CLAP_DOC_GEN_START -->")]
start_marker: String,
#[arg(long, default_value = "<!-- CLAP_DOC_GEN_END -->")]
end_marker: String,
},
#[cfg(feature = "jenkins")]
Jenkins {
#[arg(short, long)]
output_dir: Option<String>,
#[arg(long, default_value = "groovypackage")]
package_name: String,
#[arg(long)]
json_output: bool,
},
}