summary refs log tree commit diff stats
path: root/src/command_line_interface.rs
blob: 66d81220e64883992d2755985ce97e5fe5f0e818 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use clap::{Subcommand, Parser};

/// A project manager for LaTeX
#[derive(Parser, Debug)]
#[clap(author, version, about, long_about = None)]
pub struct Args {
    #[command(subcommand)]
    pub cli: Command,
}

#[derive(Subcommand, Debug)]
pub enum Command {
    /// Generates a new part
    #[command(subcommand)]
    New (SubCommand),
}


#[derive(Subcommand, Debug)]
pub enum SubCommand {
    /// Adds a section
    Section {
        /// Name of the new Section
        name: String,
    },

    /// Adds a chapter
    Chapter {
        /// Name of the new Chapter
        name: String,
    },

    /// generates a new project
    Project {
        /// Name of the new Project
        name: String,
        /// Name of the first chapter
        first_chapter: String,
        // /// Name of the first section
        // first_section: String,
    },
}