aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/command_line_interface.rs24
-rw-r--r--src/main.rs40
2 files changed, 31 insertions, 33 deletions
diff --git a/src/command_line_interface.rs b/src/command_line_interface.rs
index 66d8122..5d24ae5 100644
--- a/src/command_line_interface.rs
+++ b/src/command_line_interface.rs
@@ -1,4 +1,4 @@
-use clap::{Subcommand, Parser};
+use clap::{Parser, Subcommand};
/// A project manager for LaTeX
#[derive(Parser, Debug)]
@@ -12,10 +12,9 @@ pub struct Args {
pub enum Command {
/// Generates a new part
#[command(subcommand)]
- New (SubCommand),
+ New(SubCommand),
}
-
#[derive(Subcommand, Debug)]
pub enum SubCommand {
/// Adds a section
@@ -29,14 +28,13 @@ pub enum SubCommand {
/// 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,
- },
+ // /// 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,
+ // },
}
diff --git a/src/main.rs b/src/main.rs
index b056c88..b1d0563 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,12 +1,12 @@
-use std::path::PathBuf;
-
use clap::Parser;
use command_line_interface::{
Args,
Command::New,
- SubCommand::{Chapter, Project, Section},
+ SubCommand::{Chapter, Section},
+};
+use new::{
+ chapter::generate_new_chapter, section::generate_new_section,
};
-use new::{chapter::generate_new_chapter, project::generate_new_project, section::generate_new_section};
pub mod command_line_interface;
pub mod data;
@@ -19,22 +19,22 @@ fn main() {
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("/home/dt/repos/tex/preset/headers/preamble.tex");
- let resource_path = PathBuf::from("/home/dt/repos/tex/preset/resources");
- generate_new_project(
- name,
- first_chapter,
- //first_section,
- preamble_path,
- resource_path,
- )
- .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()
+ // }
},
}
}