From eb92038fbf4ae4cb9cca172350ef0e735572a879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Fri, 9 Jun 2023 14:48:42 +0200 Subject: [PATCH 01/13] Refactored GitRepo associated functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Strings representing where to run commands where one of: .current_dir(&(self.path.to_owned() + &self.name)) .current_dir(format!("{}{}", &self.path, &self.name)) Decided to change all instances to the latter, as asking people seemed to prefer it for readability. Signed-off-by: Christina Sørensen --- src/git.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/git.rs b/src/git.rs index 81b0b85..e8afa9f 100644 --- a/src/git.rs +++ b/src/git.rs @@ -98,7 +98,7 @@ impl GitRepo { /// Pulls the repository if able. fn pull(&self) { let out = Command::new("git") - .current_dir(&(self.path.to_owned() + &self.name)) + .current_dir(format!("{}{}", &self.path, &self.name)) .arg("pull") .status() .expect("failed to pull"); @@ -118,7 +118,7 @@ impl GitRepo { #[allow(dead_code)] fn commit(&self) { let out = Command::new("git") - .current_dir(&(self.path.to_owned() + &self.name)) + .current_dir(format!("{}{}", &self.path, &self.name)) .arg("commit") .status() .expect("failed to commit"); @@ -127,7 +127,7 @@ impl GitRepo { /// Tries to commit changes with a message argument. fn commit_with_msg(&self, msg: &String) { let out = Command::new("git") - .current_dir(&(self.path.to_owned() + &self.name)) + .current_dir(format!("{}{}", &self.path, &self.name)) .arg("commit") .arg("-m") .arg(msg) @@ -138,7 +138,7 @@ impl GitRepo { /// Attempts to push the repository. fn push(&self) { let out = Command::new("git") - .current_dir(&(self.path.to_owned() + &self.name)) + .current_dir(format!("{}{}", &self.path, &self.name)) .arg("push") .status() .expect("failed to push"); -- 2.46.0 From 7217c1cbfab2a507045069cdb17d53a356733f13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Fri, 9 Jun 2023 15:57:34 +0200 Subject: [PATCH 02/13] Removed commented out code in main.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For some reason, the match arm for --quick had only been commented out. Now it's removed. Signed-off-by: Christina Sørensen --- src/main.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 40d252c..d04b4bd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,7 +20,6 @@ fn main() { let args = Args::parse(); let config = Config::new(&args.config); match &args { - //args if args.quick == true => config.quick(&args.quick), args if args.license == true => unimplemented!(), args if args.code_of_conduct == true => unimplemented!(), _ => (), -- 2.46.0 From e8dd2b177c0c330a420159650eeed0f19f3c2798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Fri, 9 Jun 2023 16:01:26 +0200 Subject: [PATCH 03/13] Init utils/strings module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For keeping longer text output helpers, such as e.g. license text and CoC. Signed-off-by: Christina Sørensen --- src/utils.rs | 1 + src/utils/strings.rs | 1 + 2 files changed, 2 insertions(+) create mode 100644 src/utils/strings.rs diff --git a/src/utils.rs b/src/utils.rs index ce3ffca..3c695bc 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1 +1,2 @@ pub mod dir; +pub mod strings; diff --git a/src/utils/strings.rs b/src/utils/strings.rs new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/utils/strings.rs @@ -0,0 +1 @@ + -- 2.46.0 From 7c7d9f61299b02f33d1e89bb6e05349c9b3903d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Fri, 9 Jun 2023 16:09:32 +0200 Subject: [PATCH 04/13] Added GPLv3 header to files in src/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is what the GPLv3 recommends, as can be referred in the LICENSE file. Signed-off-by: Christina Sørensen --- src/cli.rs | 16 ++++++++++++++++ src/git.rs | 16 ++++++++++++++++ src/main.rs | 16 ++++++++++++++++ src/utils.rs | 16 ++++++++++++++++ src/utils/dir.rs | 16 ++++++++++++++++ src/utils/strings.rs | 16 +++++++++++++++- 6 files changed, 95 insertions(+), 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index ad4d77d..e68cfe5 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,3 +1,19 @@ +// A Rust GitOps/symlinkfarm orchestrator inspired by GNU Stow. +// Copyright (C) 2023 Christina Sørensen +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see https://www.gnu.org/gpl-3.0.html. + use crate::utils::dir::home_dir; use clap::{ArgAction, CommandFactory, Parser, Subcommand}; diff --git a/src/git.rs b/src/git.rs index e8afa9f..a293bbc 100644 --- a/src/git.rs +++ b/src/git.rs @@ -1,3 +1,19 @@ +// A Rust GitOps/symlinkfarm orchestrator inspired by GNU Stow. +// Copyright (C) 2023 Christina Sørensen +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see https://www.gnu.org/gpl-3.0.html. + use log::{debug, error, info, trace, warn}; use serde::{Deserialize, Serialize}; use std::os::unix::fs::symlink; diff --git a/src/main.rs b/src/main.rs index d04b4bd..364cf24 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,19 @@ +// A Rust GitOps/symlinkfarm orchestrator inspired by GNU Stow. +// Copyright (C) 2023 Christina Sørensen +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see https://www.gnu.org/gpl-3.0.html. + extern crate log; extern crate pretty_env_logger; diff --git a/src/utils.rs b/src/utils.rs index 3c695bc..6c70879 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,2 +1,18 @@ +// A Rust GitOps/symlinkfarm orchestrator inspired by GNU Stow. +// Copyright (C) 2023 Christina Sørensen +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see https://www.gnu.org/gpl-3.0.html. + pub mod dir; pub mod strings; diff --git a/src/utils/dir.rs b/src/utils/dir.rs index 14926c1..92c6889 100644 --- a/src/utils/dir.rs +++ b/src/utils/dir.rs @@ -1,3 +1,19 @@ +// A Rust GitOps/symlinkfarm orchestrator inspired by GNU Stow. +// Copyright (C) 2023 Christina Sørensen +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see https://www.gnu.org/gpl-3.0.html. + #![feature(stmt_expr_attributes)] use log::{debug, error, info, trace, warn}; diff --git a/src/utils/strings.rs b/src/utils/strings.rs index 8b13789..9c73d33 100644 --- a/src/utils/strings.rs +++ b/src/utils/strings.rs @@ -1 +1,15 @@ - +// A Rust GitOps/symlinkfarm orchestrator inspired by GNU Stow. +// Copyright (C) 2023 Christina Sørensen +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see https://www.gnu.org/gpl-3.0.html. -- 2.46.0 From 661b730c4425573224b91faae835a7d645e4f7a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Fri, 9 Jun 2023 16:19:29 +0200 Subject: [PATCH 05/13] Added licensing string constants to utils/strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added these three constants to utils/strings: - INTERACTIVE_NOTICE - INTERACTIVE_LICENSE - INTERACTIVE_WARRANTY These were based of the license text's notices for interactive programs, found in the "How to Apply These Terms to Your New Programs" section. Signed-off-by: Christina Sørensen --- src/utils/strings.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/utils/strings.rs b/src/utils/strings.rs index 9c73d33..c5447d1 100644 --- a/src/utils/strings.rs +++ b/src/utils/strings.rs @@ -13,3 +13,30 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see https://www.gnu.org/gpl-3.0.html. + +/// Contains the notice for interactive programs from the GPLv3's "How to Apply +/// These Terms to Your New Programs" +const INTERACTIVE_NOTICE: &str = "\ + gg Copyright (C) 2023 Christina Sørensen + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. +"; + +/// Contains the license part of the long notice for interactive programs from +/// the GPLv3's "How to Apply These Terms to Your New Programs" +const INTERACTIVE_LICENSE: &str = "\ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. +"; + +/// Contains the warranty part of the long notice for interactive programs from +/// the GPLv3's "How to Apply These Terms to Your New Programs" +const INTERACTIVE_WARRANTY: &str = "\ + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. +"; -- 2.46.0 From 9bbabb936788ba87a3a175fd93dd88f859111267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Fri, 9 Jun 2023 16:24:04 +0200 Subject: [PATCH 06/13] Added --warranty flag, typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added the --warranty flag. Removed part of docstring that said the --license would give full-text. This is wrong, as will be implementing the shorter notice. Signed-off-by: Christina Sørensen --- src/cli.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index e68cfe5..bfd54c5 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -46,11 +46,15 @@ pub struct Args { #[arg(short, long, default_value_t = home_dir() + CONFIG_FILE)] pub config: String, - /// Print full-text license information + /// Print license information #[arg(long)] pub license: bool, - /// Print full-text code-of-conduct (not implemented) + /// Print warranty information + #[arg(long)] + pub warranty: bool, + + /// Print code-of-conduct information (not implemented) #[arg(long)] pub code_of_conduct: bool, -- 2.46.0 From 65190b875218a88e7982bec891caa4709a3fdbed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Fri, 9 Jun 2023 16:26:58 +0200 Subject: [PATCH 07/13] Decided to go for a glass of water MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit My room temperature is approaching that of my processor. Hydrating is very important, in order to keep myself in peak shape for coding, I took a tactical water break. Signed-off-by: Christina Sørensen -- 2.46.0 From db6e905cbccf5d70d47a50dd973582d0e821e35a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Fri, 9 Jun 2023 17:25:15 +0200 Subject: [PATCH 08/13] Added arm to match statement for waranty in main MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added an arm to the match statement for parsing flags in main. Using the pattern and hopefully ongoing convention of making unimplemented arms indicated by using the unimplemented!() macro. Signed-off-by: Christina Sørensen --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index 364cf24..81a937f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,6 +37,7 @@ fn main() { let config = Config::new(&args.config); match &args { args if args.license == true => unimplemented!(), + args if args.warranty == true => unimplemented!(), args if args.code_of_conduct == true => unimplemented!(), _ => (), } -- 2.46.0 From 3e3566ea3c868cb45c3ca3bd112ced171857acb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Fri, 9 Jun 2023 17:30:42 +0200 Subject: [PATCH 09/13] Made utils/strings consts public MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made the following utils/strings consts public - INTERACTIVE_NOTICE - INTERACTIVE_LICENSE - INTERACTIVE_WARRANTY This is to allow their use in the flags match in main. Signed-off-by: Christina Sørensen --- src/utils/strings.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/strings.rs b/src/utils/strings.rs index c5447d1..c25561f 100644 --- a/src/utils/strings.rs +++ b/src/utils/strings.rs @@ -16,7 +16,7 @@ /// Contains the notice for interactive programs from the GPLv3's "How to Apply /// These Terms to Your New Programs" -const INTERACTIVE_NOTICE: &str = "\ +pub const INTERACTIVE_NOTICE: &str = "\ gg Copyright (C) 2023 Christina Sørensen This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it @@ -25,7 +25,7 @@ const INTERACTIVE_NOTICE: &str = "\ /// Contains the license part of the long notice for interactive programs from /// the GPLv3's "How to Apply These Terms to Your New Programs" -const INTERACTIVE_LICENSE: &str = "\ +pub const INTERACTIVE_LICENSE: &str = "\ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or @@ -34,7 +34,7 @@ const INTERACTIVE_LICENSE: &str = "\ /// Contains the warranty part of the long notice for interactive programs from /// the GPLv3's "How to Apply These Terms to Your New Programs" -const INTERACTIVE_WARRANTY: &str = "\ +pub const INTERACTIVE_WARRANTY: &str = "\ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- 2.46.0 From c8ea855451ce43d382155032a01acfbc02bdeb11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Fri, 9 Jun 2023 18:14:06 +0200 Subject: [PATCH 10/13] Implemented the flag arms for license, warranty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implemented the flag arms for license, warranty in main, but this will not work before we make the clap Parser able to be run without a subcommand, by wrapping the subcommand field of the Parser struct in an Option. Signed-off-by: Christina Sørensen --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 81a937f..533899b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -36,8 +36,8 @@ fn main() { let args = Args::parse(); let config = Config::new(&args.config); match &args { - args if args.license == true => unimplemented!(), - args if args.warranty == true => unimplemented!(), + args if args.license == true => println!("{}", utils::strings::INTERACTIVE_LICENSE), + args if args.warranty == true => println!("{}", utils::strings::INTERACTIVE_WARRANTY), args if args.code_of_conduct == true => unimplemented!(), _ => (), } -- 2.46.0 From c38b524e09a3f3a10f09d08f2fa6f4b619608a34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Fri, 9 Jun 2023 18:16:28 +0200 Subject: [PATCH 11/13] Finalized license, warranty flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made the clap Parser able to be run without a subcommand, by wrapping the subcommand field of the Parser struct in an Option. Further destructured the subcommand arms fields in main with Some(), and made the default case None just return (). Signed-off-by: Christina Sørensen --- src/cli.rs | 4 ++-- src/main.rs | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index bfd54c5..c70b9a3 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -29,7 +29,7 @@ const CONFIG_FILE: &str = "/.config/gg/config.yaml"; long_version=env!("CARGO_PKG_VERSION"), about="GitOps for the masses", long_about="A Rust GitOps and linkfarm orchestrator inspired by GNU Stow", - subcommand_required=true, + subcommand_required=false, arg_required_else_help=true, help_template="\ {before-help}{name} {version} @@ -59,7 +59,7 @@ pub struct Args { pub code_of_conduct: bool, #[command(subcommand)] - pub command: Commands, + pub command: Option, } #[derive(Subcommand, Debug)] diff --git a/src/main.rs b/src/main.rs index 533899b..4005214 100644 --- a/src/main.rs +++ b/src/main.rs @@ -42,27 +42,28 @@ fn main() { _ => (), } match &args.command { - Commands::Link { msg: _ } => { + Some(Commands::Link { msg: _ }) => { config.link_all(); } - Commands::Quick { msg } => { + Some(Commands::Quick { msg }) => { config.quick(&msg.as_ref().unwrap()); } - Commands::Clone { msg: _ } => { + Some(Commands::Clone { msg: _ }) => { config.clone_all(); } - Commands::Pull { msg: _ } => { + Some(Commands::Pull { msg: _ }) => { config.pull_all(); } - Commands::Add { msg: _ } => { + Some(Commands::Add { msg: _ }) => { config.add_all(); } - Commands::Commit { msg: _ } => { + Some(Commands::Commit { msg: _ }) => { config.commit_all(); } - Commands::CommitMsg { msg } => { + Some(Commands::CommitMsg { msg }) => { config.commit_all_msg(&msg.as_ref().unwrap()); } + None => (), } trace!("{:?}", config); } -- 2.46.0 From 0f7b525a5501af899052fa8847b6bfb745c8f3ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Fri, 9 Jun 2023 18:28:19 +0200 Subject: [PATCH 12/13] Made -h, --help show license notice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moved the help template into its own const, and concatenated it with the interactive notice to append it to the help output. Also, adjusted the license, warranty, and notice strings for increased readability. Signed-off-by: Christina Sørensen --- src/cli.rs | 19 +++++++++++-------- src/utils/strings.rs | 24 ++++++++++++------------ 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index c70b9a3..b5fa2cc 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -15,11 +15,21 @@ // along with this program. If not, see https://www.gnu.org/gpl-3.0.html. use crate::utils::dir::home_dir; +use crate::utils::strings::INTERACTIVE_NOTICE; use clap::{ArgAction, CommandFactory, Parser, Subcommand}; const CONFIG_FILE: &str = "/.config/gg/config.yaml"; +const HELP_TEMPLATE: &str = "\ + {before-help}{name} {version} + {author-with-newline}{about-with-newline} + {usage-heading} {usage} + + {all-args}{after-help} + + "; + //#[clap(author, version, about, long_about = None)] #[derive(Parser, Debug)] #[clap( @@ -31,14 +41,7 @@ const CONFIG_FILE: &str = "/.config/gg/config.yaml"; long_about="A Rust GitOps and linkfarm orchestrator inspired by GNU Stow", subcommand_required=false, arg_required_else_help=true, - help_template="\ - {before-help}{name} {version} - {author-with-newline}{about-with-newline} - {usage-heading} {usage} - - {all-args}{after-help} - - ", + help_template=HELP_TEMPLATE.to_owned()+INTERACTIVE_NOTICE, )] pub struct Args { /// The config file to use diff --git a/src/utils/strings.rs b/src/utils/strings.rs index c25561f..a06c565 100644 --- a/src/utils/strings.rs +++ b/src/utils/strings.rs @@ -17,26 +17,26 @@ /// Contains the notice for interactive programs from the GPLv3's "How to Apply /// These Terms to Your New Programs" pub const INTERACTIVE_NOTICE: &str = "\ - gg Copyright (C) 2023 Christina Sørensen - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. +gg Copyright (C) 2023 Christina Sørensen +This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. +This is free software, and you are welcome to redistribute it +under certain conditions; type `show c' for details. "; /// Contains the license part of the long notice for interactive programs from /// the GPLv3's "How to Apply These Terms to Your New Programs" pub const INTERACTIVE_LICENSE: &str = "\ - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. "; /// Contains the warranty part of the long notice for interactive programs from /// the GPLv3's "How to Apply These Terms to Your New Programs" pub const INTERACTIVE_WARRANTY: &str = "\ - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. "; -- 2.46.0 From 696eacf8d71cada948fc55eb7b4832b146276260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Fri, 9 Jun 2023 18:31:22 +0200 Subject: [PATCH 13/13] bump to V0.0.2: license to license MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added licenses to files in src. Implemented flags: - warranty - license Added license notice to help. Refactored parts of the code. Signed-off-by: Christina Sørensen --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a3234c1..ef7fb80 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -190,7 +190,7 @@ dependencies = [ [[package]] name = "gg" -version = "0.0.1" +version = "0.0.2" dependencies = [ "clap", "clap_mangen", diff --git a/Cargo.toml b/Cargo.toml index c5ea387..2b9d34c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gg" -version = "0.0.1" +version = "0.0.2" edition = "2021" authors = ["Christina Sørensen "] repository = "https://github.com/cafkafk/gg" -- 2.46.0