Updated help section and README

This commit is contained in:
Sayantan Santra 2022-12-08 21:23:58 -06:00
parent 28d7c7d3b8
commit 408824aca9
2 changed files with 4 additions and 2 deletions

View file

@ -6,11 +6,12 @@ This is made mostly due to [mnamer](https://github.com/jkwill87/mnamer) not havi
The expected syntax is:
`movie_rename <filename(s)> [--dry-run] [--help]`
`movie_rename <filename(s)> [--dry-run] [--directory] [--help]`
- There needs to be a config file names movie_rename.conf in your $XDG_CONFIG_HOME.
- It should consist of two lines. The first line should have your TMDb API key.
- The second line should have a pattern, that will be used for the rename.
- In the pattern, the variables need to be enclosed in {{}}, the supported variables are `title`, `year` and `director`.
- Default pattern is `{title} ({year}) - {director}`. Extension is always kept.
- Passing `--directory` assumes that the arguments are directory names, which contain exactly one movie and optionally subtitles.
I plan to add more variables in the future. Support for TV Shows will not be added, since [tvnamer](https://github.com/dbr/tvnamer) does that excellently.

View file

@ -261,7 +261,7 @@ fn process_args(mut args: Vec<String>) -> (Vec<String>, HashMap<&'static str, bo
match arg.as_str() {
"--help" => {
println!(" The expected syntax is:");
println!(" movie_rename <filename(s)> [--dry-run]");
println!(" movie_rename <filename(s)> [--dry-run] [--directory]");
println!(
" There needs to be a config file names movie_rename.conf in your $XDG_CONFIG_HOME."
);
@ -273,6 +273,7 @@ fn process_args(mut args: Vec<String>) -> (Vec<String>, HashMap<&'static str, bo
println!(
" Default pattern is `{{title}} ({{year}}) - {{director}}`. Extension is always kept."
);
println!("Passing --directory assumes that the arguments are directory names, which contain exactly one movie and optionally subtitles.");
println!(" Pass --help to get this again.");
exit(0);
}