A simple tool to rename movies, written in Rust.
Find a file
dependabot[bot] f979559b50
build(deps): bump h2 from 0.3.24 to 0.3.26
Bumps [h2](https://github.com/hyperium/h2) from 0.3.24 to 0.3.26.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/v0.3.26/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.24...v0.3.26)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-05 16:18:23 +00:00
src new: Print some message when flags are set 2024-03-11 18:23:16 -05:00
.gitignore Added make option to create archive for aur 2023-02-26 14:07:04 -06:00
build.rs new: Autocomplete files generation 2024-03-06 15:41:45 -06:00
Cargo.lock build(deps): bump h2 from 0.3.24 to 0.3.26 2024-04-05 16:18:23 +00:00
Cargo.toml build: Bumped version to 2.3.0 2024-03-06 15:42:36 -06:00
LICENSE Updated LICENSE 2023-04-10 20:05:20 -05:00
Makefile new: Autocomplete files generation 2024-03-06 15:41:45 -06:00
movie-rename.1 chg: Slightly modified the manpage 2024-03-08 10:45:04 -06:00
README.md feat: Possible to merge the short flags 2023-12-04 18:27:22 -06:00

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

movie-rename

A simple tool to rename movies, written in Rust.

It turns a file like Apur.Sansar.HEVC.2160p.AC3.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.

You can also install from source by using

git clone https://github.com/SinTan1729/movie-rename
cd movie-rename
sudo make install

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 --i-feel-lucky or -l automatically chooses the first option. Useful when you use the program as part of a script.

  • You can join the short flags -d, -n and -l together (e.g. -dn or -dln).

  • 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.