A simple tool to rename movies, written in Rust.
Find a file
Sayantan Santra 0745539b88
Merge pull request #1 from SinTan1729/fix-vulnerabilities
Add up to date dependencies
2023-02-07 18:18:16 -06:00
src Show full language name in selection menu 2022-12-11 00:15:18 -06:00
.gitignore Add subtitles support 2022-12-08 00:21:36 -06:00
Cargo.lock Add up to date dependencies 2023-02-07 18:16:20 -06:00
Cargo.toml Add up to date dependencies 2023-02-07 18:16:20 -06:00
LICENSE Added LICENSE 2022-12-08 00:55:23 -06:00
movie-rename.1 Improved arguments handling 2022-12-10 18:39:33 -06:00
README.md Added AUR badge 2023-02-01 11:32:39 -06:00

latest-release commits-since-latest-release AUR package

movie-rename

A simple tool to rename movies, written in Rust.

It turns Apur Sansar.mkv into Apur Sansar (1959) - Satyajit Ray.mkv using metadata pulled from TMDb.

This is made mostly due to mnamer not having support for director's name, and also because I wanted to try writing something useful in Rust.

Installation

Install from AUR, my personal lure-repo or download the binary from the releases. You can also get it from crates.io.

Usage

  • The syntax is:

    movie-rename <filename(s)> [-n|--dry-run] [-d|--directory] [-h|--help] [-v|--version]

  • There needs to be a config file named config in the $XDG_CONFIG_HOME/movie-rename/ directory.

  • 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 or -d assumes that the arguments are directory names, which contain exactly one movie and optionally subtitles.

  • Passing --dry-run or -n does a dry tun and only prints out the new names, without actually doing anything.

  • Passing -nd or -dn does a dry run in directory mode.

  • Passing --help or -h shows help and exits.

  • Passing --version or -v shows version and exits.

Notes

  • Currently, it only supports names in English. It should be easy to turn it into a configurable option. Since for movies in all the languages I know, English name is usually provided, it's a non-feature for me. If someone is willing to test it out for other languages, they're welcome. I'm open to accepting PRs.
  • I plan to add more variables in the future. Support for TV Shows will not be added, since tvnamer does that excellently.