From 35dff5cdafebf624ef4086456d8f9f34cbee1be6 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Thu, 21 Dec 2023 19:28:31 -0500 Subject: [PATCH] Rename to natter. --- Cargo.lock | 34 +++++++++++++++++----------------- Cargo.toml | 2 +- src/cli/parameters.rs | 6 +++--- src/command/init/mod.rs | 2 +- src/command/init/runner.rs | 2 +- src/config/full.rs | 2 +- src/config/raw.rs | 2 +- src/main.rs | 4 ++-- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4963dff..59c8093 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -401,6 +401,23 @@ dependencies = [ "adler", ] +[[package]] +name = "natter" +version = "0.0.1" +dependencies = [ + "clap", + "duster", + "futures", + "include_dir", + "organic", + "serde", + "serde_json", + "tokio", + "toml", + "tree-sitter-highlight", + "walkdir", +] + [[package]] name = "nom" version = "6.1.2" @@ -831,23 +848,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "writer" -version = "0.0.1" -dependencies = [ - "clap", - "duster", - "futures", - "include_dir", - "organic", - "serde", - "serde_json", - "tokio", - "toml", - "tree-sitter-highlight", - "walkdir", -] - [[package]] name = "wyz" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index e7d82f1..4b41bf8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "writer" +name = "natter" version = "0.0.1" edition = "2021" diff --git a/src/cli/parameters.rs b/src/cli/parameters.rs index d5551fb..6b3314b 100644 --- a/src/cli/parameters.rs +++ b/src/cli/parameters.rs @@ -4,7 +4,7 @@ use clap::Subcommand; use std::path::PathBuf; #[derive(Parser, Debug)] -#[command(name = "Writer")] +#[command(name = "Natter")] #[command(version = env!("CARGO_PKG_VERSION"))] #[command(about = "Generate a static site.", long_about = None)] #[command(propagate_version = true)] @@ -24,14 +24,14 @@ pub(crate) enum Commands { #[derive(Args, Debug)] pub(crate) struct InitArgs { - /// Path where you want the initial writer structure to be located. + /// Path where you want the initial natter structure to be located. #[arg(short, long)] pub(crate) path: PathBuf, } #[derive(Args, Debug)] pub(crate) struct BuildArgs { - /// Path to the writer config file. + /// Path to the natter config file. #[arg(short, long)] pub(crate) config: PathBuf, } diff --git a/src/command/init/mod.rs b/src/command/init/mod.rs index 195b96e..c4549a6 100644 --- a/src/command/init/mod.rs +++ b/src/command/init/mod.rs @@ -1,3 +1,3 @@ mod runner; -pub(crate) use runner::init_writer_folder; +pub(crate) use runner::init_natter_folder; diff --git a/src/command/init/runner.rs b/src/command/init/runner.rs index 40d1871..8f13528 100644 --- a/src/command/init/runner.rs +++ b/src/command/init/runner.rs @@ -2,7 +2,7 @@ use crate::cli::parameters::InitArgs; use crate::config::Config; use crate::error::CustomError; -pub(crate) async fn init_writer_folder(args: InitArgs) -> Result<(), CustomError> { +pub(crate) async fn init_natter_folder(args: InitArgs) -> Result<(), CustomError> { if args.path.exists() && !args.path.is_dir() { return Err("The supplied path exists but is not a directory. Aborting.".into()); } diff --git a/src/config/full.rs b/src/config/full.rs index 5fdfd1f..b102a18 100644 --- a/src/config/full.rs +++ b/src/config/full.rs @@ -17,7 +17,7 @@ pub(crate) struct Config { impl Config { pub(crate) fn new>(root_dir: P) -> Result { fn inner(root_dir: &Path) -> Result { - let file_path = root_dir.join("writer.toml"); + let file_path = root_dir.join("natter.toml"); Ok(Config { raw: RawConfig::default(), config_path: file_path, diff --git a/src/config/raw.rs b/src/config/raw.rs index 29cb4b9..b25319d 100644 --- a/src/config/raw.rs +++ b/src/config/raw.rs @@ -1,7 +1,7 @@ use serde::Deserialize; use serde::Serialize; -/// This is the struct for the writer.toml config file that ends up in each site's root directory. +/// This is the struct for the natter.toml config file that ends up in each site's root directory. #[derive(Debug, Deserialize, Serialize)] pub(crate) struct RawConfig { pub(super) site_title: Option, diff --git a/src/main.rs b/src/main.rs index 71c1ab3..e603fca 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,7 @@ use clap::Parser; use self::cli::parameters::Cli; use self::cli::parameters::Commands; use self::command::build::build_site; -use self::command::init::init_writer_folder; +use self::command::init::init_natter_folder; use self::error::CustomError; mod cli; mod command; @@ -28,7 +28,7 @@ async fn main_body() -> Result { let args = Cli::parse(); match args.command { Commands::Init(args) => { - init_writer_folder(args).await?; + init_natter_folder(args).await?; } Commands::Build(args) => { build_site(args).await?;