Crates.io | movie-rename |
lib.rs | movie-rename |
version | 2.0.0 |
source | src |
created_at | 2022-12-11 05:39:04.359081 |
updated_at | 2023-05-16 04:36:54.108967 |
description | A simple tool to rename movies, written in Rust. |
homepage | https://github.com/SinTan1729/movie-rename |
repository | https://github.com/SinTan1729/movie-rename |
max_upload_size | |
id | 734176 |
size | 91,142 |
movie-rename
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.
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
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.