use crate::prelude::*;
mod cluster;
mod scan;
mod work_gender;
#[derive(Args, Debug)]
pub struct Goodreads {
#[command(subcommand)]
command: GRCmd,
}
#[derive(clap::Subcommand, Debug)]
enum GRCmd {
Scan {
#[command(subcommand)]
data: scan::GRScan,
},
ClusterInteractions(cluster::CICommand),
WorkGender,
}
impl Command for Goodreads {
fn exec(&self) -> Result<()> {
match &self.command {
GRCmd::Scan { data } => {
data.exec()?;
}
GRCmd::ClusterInteractions(opts) => {
opts.exec()?;
}
GRCmd::WorkGender => {
work_gender::link_work_genders()?;
}
}
Ok(())
}
}