ik-mini-epub-cli 0.0.1-alpha.3

A CLI tool to download IK Storeis into epubs.
use clap::{Args, Parser, Subcommand};
use std::path::PathBuf;

#[derive(Parser, Debug)]
#[command(name = "wpepub", version, about, long_about = None)]
pub(crate) struct WPEpubCli {
    #[command(subcommand)]
    pub(crate) command: Commands,
}

#[derive(Subcommand, Debug)]
pub(crate) enum Commands {
    /// Processes a story from a given ID.
    Do(DoArgs),
}

/// Represents the arguments for the 'do' subcommand.
#[derive(Args, Debug)]
pub(crate) struct DoArgs {
    /// ID of the story to process
    #[arg(short = 'd', long)]
    pub(crate) id: u64,

    /// Username/Email for login
    #[arg(short = 'e', long = "email")]
    pub(crate) email: String,

    /// Password for login
    #[arg(short = 'p', long = "password")]
    pub(crate) password: String,

    /// Include images in the output PDF
    #[arg(short = 'i', long = "img")]
    pub(crate) include_images: bool,

    /// Output directory path [default: current directory]
    #[arg(short = 'o', long, value_name = "DIRECTORY")]
    pub(crate) output_path: Option<PathBuf>,

    /// Number of chapters to process concurrently
    #[arg(short = 's', long, default_value_t = 20)]
    pub(crate) semaphore: u32,
}

/// Represents the arguments for the 'login' subcommand.
#[derive(Args, Debug)]
pub(crate) struct LoginArgs {
    /// Username for login
    #[arg(short = 'e', long = "email")]
    pub(crate) email: String,

    /// Password for login
    #[arg(short = 'p', long = "password")]
    pub(crate) password: String,
}