bookdata/cli/goodreads/
mod.rs

1use crate::prelude::*;
2
3mod scan;
4
5/// GoodReads processing commands.
6#[derive(Args, Debug)]
7pub struct Goodreads {
8    #[command(subcommand)]
9    command: GRCmd,
10}
11
12#[derive(clap::Subcommand, Debug)]
13enum GRCmd {
14    /// Scan GoodReads data.
15    Scan {
16        #[command(subcommand)]
17        data: scan::GRScan,
18    },
19}
20
21impl Command for Goodreads {
22    fn exec(&self) -> Result<()> {
23        match &self.command {
24            GRCmd::Scan { data } => {
25                data.exec()?;
26            }
27        }
28
29        Ok(())
30    }
31}