summary refs log tree commit diff stats
path: root/src/cli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/cli.rs b/src/cli.rs
new file mode 100644
index 0000000..fe1b194
--- /dev/null
+++ b/src/cli.rs
@@ -0,0 +1,35 @@
+use clap::{Parser, Subcommand};
+
+/// A project manager for LaTeX
+#[derive(Parser, Debug)]
+#[command(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(What),
+}
+
+#[derive(Subcommand, Debug)]
+pub enum What {
+    /// Adds a section
+    Section {
+        /// The name of the chapter to extend, can be empty when the current_dir is inside a
+        /// chapter already.
+        #[arg(long, short)]
+        chapter: Option<String>,
+        /// Name of the new Section
+        name: String,
+    },
+
+    /// Adds a chapter
+    Chapter {
+        /// Name of the new Chapter
+        name: String,
+    },
+}