diff --git a/Cargo.lock b/Cargo.lock index 4fba6f2..86edba4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -104,9 +104,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck", - "proc-macro2 1.0.91", - "quote 1.0.37", - "syn 2.0.89", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -166,15 +166,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3bf70094d203e07844da868b634207e71bfab254fe713171fae9a6e751ccf31" -[[package]] -name = "proc-macro2" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b6a521dc81b643e9a51e0d1cf05df46d5a2f3c0280ea72bcb68276ba64a118" -dependencies = [ - "unicode-xid", -] - [[package]] name = "proc-macro2" version = "1.0.91" @@ -194,22 +185,13 @@ dependencies = [ "getopts", ] -[[package]] -name = "quote" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0ff51282f28dc1b53fd154298feaa2e77c5ea0dba68e1fd8b03b72fbe13d2a" -dependencies = [ - "proc-macro2 0.3.6", -] - [[package]] name = "quote" version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ - "proc-macro2 1.0.91", + "proc-macro2", ] [[package]] @@ -236,30 +218,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.38" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c36359ac1a823e00db02a243376ced650f088dc1f6259bbf828e4668e3c7399" - -[[package]] -name = "serde_derive" -version = "1.0.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0477feff739386f5bca8e13fa43d96a4e834904d538f503906c8179f9205f50" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ - "proc-macro2 0.3.6", - "quote 0.5.1", - "serde_derive_internals", - "syn 0.13.1", + "serde_derive", ] [[package]] -name = "serde_derive_internals" -version = "0.23.1" +name = "serde_derive" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d30c4596450fd7bbda79ef15559683f9a79ac0193ea819db90000d7e1cae794" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ - "proc-macro2 0.3.6", - "syn 0.13.1", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -268,25 +242,14 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" -[[package]] -name = "syn" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91b52877572087400e83d24b9178488541e3d535259e04ff17a63df1e5ceff59" -dependencies = [ - "proc-macro2 0.3.6", - "quote 0.5.1", - "unicode-xid", -] - [[package]] name = "syn" version = "2.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" dependencies = [ - "proc-macro2 1.0.91", - "quote 1.0.37", + "proc-macro2", + "quote", "unicode-ident", ] @@ -335,12 +298,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - [[package]] name = "unreachable" version = "1.0.0" diff --git a/Cargo.toml b/Cargo.toml index 335fd8a..b18de31 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,9 +8,9 @@ edition = "2021" [dependencies] pulldown-cmark = "*" toml = "*" -serde = "*" -serde_derive = "*" regex = "*" ansi_term = "*" pathdiff = "*" clap = { version = "4.5.21", features = ["derive"] } +serde = "1.0.215" +serde_derive = "1.0.215" diff --git a/src/options.rs b/src/options.rs index df7d549..ad3a23a 100644 --- a/src/options.rs +++ b/src/options.rs @@ -2,15 +2,14 @@ use std::path::PathBuf; use clap::{Parser, Subcommand}; -// #[structopt(name = "Teasca.de Generator", -// about = "A website generator, used mainly for generating teasca.de")] -/// Hello! +/// A website generator, used mainly for generating teascade.net #[derive(Parser, Debug, Clone)] #[command(version, about, long_about = None)] pub struct Options { /// verbose flag, makes the program more noisy. (-vv for maximum noisiness) #[arg(short, long, action = clap::ArgAction::Count)] pub verbose: u8, + /// quiet flag, makes the program less noisy. (-qqq for minimum noisiness) #[arg(short, long, action = clap::ArgAction::Count)] pub quiet: u8, @@ -34,8 +33,6 @@ pub enum Subcommands { Initialize(InitializeOpt), } -/// beep -// #[argh(subcommand, name = "new")] #[derive(Parser, Debug, Clone)] #[clap(disable_help_flag = true)] pub struct NewOpt { @@ -47,11 +44,11 @@ pub struct NewOpt { /// file path for the markdown file created #[arg(long = "markdown", short)] - pub markdown_path: Option, // TODO, should be 'markdown' + pub markdown_path: Option, /// output html file path of the generated page #[arg(long = "html", short)] - pub html_path: Option, // TODO, should be 'html' + pub html_path: Option, /// sets the title of the generated page #[arg(short, long)] @@ -62,7 +59,6 @@ pub struct NewOpt { pub no_modify_config: bool, } -/// beep #[derive(Parser, Debug, Clone)] pub struct InitializeOpt { /// name of the webpage