Added README

This commit is contained in:
Sayantan Santra 2022-12-08 01:03:56 -06:00
parent e31e0c84f4
commit c65b0823fb
2 changed files with 23 additions and 7 deletions

16
README.md Normal file
View file

@ -0,0 +1,16 @@
# movie-rename
## A simple tool to reame movies, written in Rust.
This is made mostly due to [mnamer](https://github.com/jkwill87/mnamer) not having support for director's name, and partly because I wanted to try writing something useful in Rust.
The expected syntax is:
`movie_rename <filename(s)> [--dry-run]`
- 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.
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

@ -51,16 +51,16 @@ fn main() {
// If --help is passed, show help and exit
if filenames.contains(&"--help".to_string()) {
println!("The expected syntax is:");
println!("movie_rename <filename(s)> [--dry-run]");
println!(" The expected syntax is:");
println!(" movie_rename <filename(s)> [--dry-run]");
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!("The second line should have a pattern, that will be used for the rename.");
println!("In the pattern, the variables need to be enclosed in {{}}, the supported variables are `title`, `year` and `director`.");
println!(" It should consist of two lines. The first line should have your TMDb API key.");
println!(" The second line should have a pattern, that will be used for the rename.");
println!(" In the pattern, the variables need to be enclosed in {{}}, the supported variables are `title`, `year` and `director`.");
println!(
"Extension is always kept. Default pattern is `{{title}} ({{year}}) - {{director}}`"
" Default pattern is `{{title}} ({{year}}) - {{director}}`. Extension is always kept."
);
exit(0);
}