diff --git a/Cargo.lock b/Cargo.lock index 56b7b52..f1acaed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -737,8 +737,8 @@ dependencies = [ ] [[package]] -name = "movie_rename" -version = "1.1.2" +name = "movie-rename" +version = "1.2.0" dependencies = [ "inquire", "load_file", diff --git a/Cargo.toml b/Cargo.toml index 774d04d..4dd02b0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "movie_rename" -version = "1.1.2" +name = "movie-rename" +version = "1.2.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/movie_rename.1 b/movie-rename.1 similarity index 78% rename from movie_rename.1 rename to movie-rename.1 index 537a936..d4e8c1c 100644 --- a/movie_rename.1 +++ b/movie-rename.1 @@ -1,12 +1,12 @@ -.\" Manpage for movie_rename. +.\" Manpage for movie-rename. .\" Contact sayantan[dot]santra689[at]gmail[dot]com to correct errors or typos. -.TH man 1 "08 Dec 2022" "1.1.1" "movie_rename man page" +.TH man 1 "08 Dec 2022" "1.1.1" "movie-rename man page" .SH NAME -movie_rename +movie-rename .SH SYNOPSIS -movie_rename [-n|--dry-run] [-d|--directory] [-h|--help] [-v|--version] +movie-rename [-n|--dry-run] [-d|--directory] [-h|--help] [-v|--version] .SH DESCRIPTION -movie_rename is a simple tool to rename movies, written in Rust. +movie-rename is a simple tool to rename movies, written in Rust. .SH ARGUMENTS A list of filenames (or directory names, not both). -d or --directory must be passed to work with directories. .SH OPTIONS @@ -23,7 +23,7 @@ Print help information. -v, --version Print version information. .SH CONFIG -There needs to be a config file named movie_rename.conf in your $XDG_CONFIG_HOME. +There needs to be a config file named movie-rename.conf in your $XDG_CONFIG_HOME. It should consist of two lines. .sp The first line should have your TMDb API key. diff --git a/src/functions.rs b/src/functions.rs index c6195ea..7bddf77 100644 --- a/src/functions.rs +++ b/src/functions.rs @@ -138,10 +138,10 @@ pub fn process_args(mut args: Vec) -> (Vec, HashMap<&'static str "--help" | "-h" => { println!(" The expected syntax is:"); println!( - " movie_rename [-n|--dry-run] [-d|--directory] [-v|--version]" + " movie-rename [-n|--dry-run] [-d|--directory] [-v|--version]" ); println!( - " There needs to be a config file names movie_rename.conf in your $XDG_CONFIG_HOME." + " There needs to be a config file names movie-rename.conf in your $XDG_CONFIG_HOME." ); println!(" It should consist of two lines. The first line should have your TMDb API key."); println!( @@ -164,7 +164,7 @@ pub fn process_args(mut args: Vec) -> (Vec, HashMap<&'static str settings.entry("directory").and_modify(|x| *x = true); } "--version" | "-v" => { - println!("movie_rename {}", VERSION); + println!("movie-rename {}", VERSION); exit(0); } other => { diff --git a/src/main.rs b/src/main.rs index bf5f738..9499ac6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,7 +20,7 @@ fn main() { config_file = env::var("$HOME").unwrap(); config_file.push_str("/.config"); } - config_file.push_str("/movie_rename.conf"); + config_file.push_str("/movie-rename.conf"); let mut config = load_str!(config_file.as_str()).lines(); let api_key = config.next().unwrap_or(""); let pattern = config.next().unwrap_or("{title} ({year}) - {director}");