Version bump and name change

This commit is contained in:
Sayantan Santra 2022-12-09 15:02:20 -06:00
parent 1309ed34b4
commit 5f348cddcf
5 changed files with 14 additions and 14 deletions

4
Cargo.lock generated
View file

@ -737,8 +737,8 @@ dependencies = [
] ]
[[package]] [[package]]
name = "movie_rename" name = "movie-rename"
version = "1.1.2" version = "1.2.0"
dependencies = [ dependencies = [
"inquire", "inquire",
"load_file", "load_file",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "movie_rename" name = "movie-rename"
version = "1.1.2" version = "1.2.0"
edition = "2021" edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View file

@ -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. .\" 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 .SH NAME
movie_rename movie-rename
.SH SYNOPSIS .SH SYNOPSIS
movie_rename <filename(s)> [-n|--dry-run] [-d|--directory] [-h|--help] [-v|--version] movie-rename <filename(s)> [-n|--dry-run] [-d|--directory] [-h|--help] [-v|--version]
.SH DESCRIPTION .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 .SH ARGUMENTS
A list of filenames (or directory names, not both). -d or --directory must be passed to work with directories. A list of filenames (or directory names, not both). -d or --directory must be passed to work with directories.
.SH OPTIONS .SH OPTIONS
@ -23,7 +23,7 @@ Print help information.
-v, --version -v, --version
Print version information. Print version information.
.SH CONFIG .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. It should consist of two lines.
.sp .sp
The first line should have your TMDb API key. The first line should have your TMDb API key.

View file

@ -138,10 +138,10 @@ pub fn process_args(mut args: Vec<String>) -> (Vec<String>, HashMap<&'static str
"--help" | "-h" => { "--help" | "-h" => {
println!(" The expected syntax is:"); println!(" The expected syntax is:");
println!( println!(
" movie_rename <filename(s)> [-n|--dry-run] [-d|--directory] [-v|--version]" " movie-rename <filename(s)> [-n|--dry-run] [-d|--directory] [-v|--version]"
); );
println!( 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!(" It should consist of two lines. The first line should have your TMDb API key.");
println!( println!(
@ -164,7 +164,7 @@ pub fn process_args(mut args: Vec<String>) -> (Vec<String>, HashMap<&'static str
settings.entry("directory").and_modify(|x| *x = true); settings.entry("directory").and_modify(|x| *x = true);
} }
"--version" | "-v" => { "--version" | "-v" => {
println!("movie_rename {}", VERSION); println!("movie-rename {}", VERSION);
exit(0); exit(0);
} }
other => { other => {

View file

@ -20,7 +20,7 @@ fn main() {
config_file = env::var("$HOME").unwrap(); config_file = env::var("$HOME").unwrap();
config_file.push_str("/.config"); 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 mut config = load_str!(config_file.as_str()).lines();
let api_key = config.next().unwrap_or(""); let api_key = config.next().unwrap_or("");
let pattern = config.next().unwrap_or("{title} ({year}) - {director}"); let pattern = config.next().unwrap_or("{title} ({year}) - {director}");