bookdata/cli/goodreads/
mod.rs1use crate::prelude::*;
2
3mod cluster;
4mod scan;
5mod work_gender;
6
7#[derive(Args, Debug)]
9pub struct Goodreads {
10 #[command(subcommand)]
11 command: GRCmd,
12}
13
14#[derive(clap::Subcommand, Debug)]
15enum GRCmd {
16 Scan {
18 #[command(subcommand)]
19 data: scan::GRScan,
20 },
21 ClusterInteractions(cluster::CICommand),
23 WorkGender,
25}
26
27impl Command for Goodreads {
28 fn exec(&self) -> Result<()> {
29 match &self.command {
30 GRCmd::Scan { data } => {
31 data.exec()?;
32 }
33 GRCmd::ClusterInteractions(opts) => {
34 opts.exec()?;
35 }
36 GRCmd::WorkGender => {
37 work_gender::link_work_genders()?;
38 }
39 }
40
41 Ok(())
42 }
43}