mirror of
https://github.com/SinTan1729/movie-rename.git
synced 2024-12-25 19:58:36 -06:00
Added README
This commit is contained in:
parent
e31e0c84f4
commit
c65b0823fb
2 changed files with 23 additions and 7 deletions
16
README.md
Normal file
16
README.md
Normal 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.
|
14
src/main.rs
14
src/main.rs
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue