summary refs log tree commit diff stats
path: root/src/main.rs
blob: b19e7bff2adb14b7c1c6f4fdd2116f0b92ea1c4d (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
use clap::Parser;
use command_line_interface::{
    Args,
    Command::New,
    SubCommand::{Chapter, Section},
};
use new::{chapter::generate_new_chapter, section::generate_new_section};

pub mod command_line_interface;
pub mod data;
pub mod new;

fn main() {
    let args = Args::parse();

    match args.cli {
        New(new_command) => match new_command {
            Section { name } => generate_new_section(name).unwrap(),
            Chapter { name } => generate_new_chapter(name).unwrap(),
            //            Project {
            //                name,
            //                first_chapter,
            //                //first_section,
            //            } => {
            //                let preamble_path = PathBuf::from("");
            //                let resource_path = PathBuf::from("");
            //                generate_new_project(
            //                    name,
            //                    first_chapter,
            //                    //first_section,
            //                    preamble_path,
            //                    resource_path,
            //                )
            //                .unwrap()
            //            }
        },
    }
}