tv_rename/README.md

90 lines
3.7 KiB
Markdown
Raw Permalink Normal View History

2020-05-09 22:51:16 +00:00
[![pipeline status](https://gitlab.com/zvon/tv_rename/badges/master/pipeline.svg)](https://gitlab.com/zvon/tv_rename/-/commits/master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9aace967ca614da4bdb7a500f63858dd)](https://www.codacy.com/manual/tom.zvon/tv_rename?utm_source=gitlab.com&utm_medium=referral&utm_content=zvon/tv_rename&utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/9aace967ca614da4bdb7a500f63858dd)](https://www.codacy.com/manual/tom.zvon/tv_rename?utm_source=gitlab.com&utm_medium=referral&utm_content=zvon/tv_rename&utm_campaign=Badge_Coverage)
2018-09-24 21:24:46 +00:00
# Rename TV Show files
2020-05-09 22:51:16 +00:00
This program downloads information about TV show episodes from <http://thetvdb.com> and renames episode files according to supplied name pattern.
2018-09-24 21:24:46 +00:00
For this to work your file needs to contain the season and episode number (in accordance to thetvdb) in this format: S#E# (doesn't matter if lower or upper case)
## Usage
2020-05-09 22:51:16 +00:00
You can either just rename files in a directory (this is done recursively, so you can enter a directory with multiple seasons, but all the files have to be from a single show). Or you can add a directory to local database, so when you add a new episode to the directory you just need to run database update for the file to be renamed.
2018-09-24 21:24:46 +00:00
Arguments:
`-s, --show` - Name of the show
`-n, --season` - Seasons to be renamed (numbers separated by space or 'all' for all seasons in the directory and sub directories)
2018-09-24 21:24:46 +00:00
2020-05-09 22:51:16 +00:00
`-d, --dvd` - use DVD ordering instead of aired ordering
2018-09-24 21:24:46 +00:00
`-c, --correct-path` - Don't ask if path is correct
`-t, --trust` - Don't prompt before changing file names
`-x, --linux` - Don't replace characters that are illegal in NTFS
2018-09-24 21:24:46 +00:00
`-l, --lang` - Language of the episode titles
2019-01-07 22:34:46 +00:00
`--print_langs` - Print available languages
2019-01-23 17:24:33 +00:00
`--name-pattern` - Pattern by which the files should be renamed
2020-04-16 11:33:21 +00:00
- %filename - original filename
- %show - show name from thetvdb
- %epname - episode name from thetvdb
- %season - season number, possible to specify leading 0 like this: %2season (number means how many leading zeros)
- %episode - episode number, possible to specify leading 0 like this: %3season (number means how many leading zeros)
2020-05-09 22:51:16 +00:00
`--db-add` - Add path to database
`--db-refresh` - Refresh episode names for all paths in the database
`--db-update` - Check all paths in the database, if they contain new files, rename them
`--db-name-pattern` - Change name pattern used for files managed by the database
`--db-clean` - Remove deleted files from the database
`--db-remove` - Remove path from the database
## Installation
For installation of command line version you'll need:
2019-05-18 13:22:31 +00:00
2020-04-16 11:33:21 +00:00
- *libcurl-dev* (or your distro's equivalent)
2020-05-09 22:51:16 +00:00
- *sqlite-dev* (or your distro's equivalent)
2020-04-16 11:33:21 +00:00
- some sort of C++ compiler (*clang++* for example)
- *make*
2019-05-18 13:22:31 +00:00
When you have all prerequisites installed you need to do this sequence of commands:
2019-05-18 13:22:31 +00:00
2020-05-09 22:51:16 +00:00
git clone 'https://gitlab.com/zvon/tv_rename.git'
cd tv_rename_cpp
git submodule update --init
make
sudo make install
For installation of GUI version you'll need:
2019-05-18 13:22:31 +00:00
2020-04-16 11:33:21 +00:00
- *libcurl-dev* (or your distro's equivalent)
2020-05-09 22:51:16 +00:00
- *sqlite-dev* (or your distro's equivalent)
- *libgtkmm-dev* (or your distro's equivalent)
2020-04-16 11:33:21 +00:00
- some sort of C++ compiler (*clang++* for example)
- *make*
2019-05-18 13:22:31 +00:00
When you have all prerequisites installed you need to do this sequence of commands:
2019-05-18 13:22:31 +00:00
git clone 'https://gitlab.com/zvon/tv_rename_cpp'
cd tv_rename_cpp
git submodule update --init
make gui
sudo make install_gui
You can uninstall both versions by running either `sudo make uninstall` or `sudo make uninstall_gui`
2020-01-31 21:38:11 +00:00
## 3rd party libraries
2020-05-09 22:51:16 +00:00
This project uses the following 3rd party libraries:
2020-04-16 11:33:21 +00:00
- rapidjson - <https://github.com/Tencent/rapidjson>
- sqlite3 - <https://sqlite.org/>