3.4.2 MIT/X Consortium License    


Rename tv show files using online databases




tvrenamr is an utility to rename TV shows based upon filenames or user input.

How To Use

Run the script with: python [options] file/folder


-e or --episode - Set the episode number for a file. Cannot be used when renaming more than one file.
--ignore-recursive - Only use files from the root of the specified directory and do not enter any sub-directories.
-l or --log_level - Set the log level. Valid options are debug, info, warning, error and critical.
--library - Set the library to use for retrieving episode titles. This defaults to tvrage, but thetvdb is also available.
-n or --name - Set the name of the name of the show to rename.
-o or --output - Set the output format for the episodes being renamed.
--organise - Automatically move renamed files to the directory specified with -r and organise them based on their show name and season number.
-r or --renamed - The directory to move renamed files to, if not specified the working directory is used.
--regex - The regular expression to use when extracting information from files.
-s or --season - Set the season number. Cannot be used when renaming more than one file.
-t or --the - Set the position of 'The' in a show's name to the end of the show name, i.e. 'The Wire' becomes 'Wire, The'.
-x or --exceptions - Specify the location of an exceptions file.


 * python --organise -r '/path/to/a/directory/' /path/a/directory/or/file/[the_file.avi]
 * python --season=number --name=name /path/to/a/file/the_file.avi

Custom Regular Expressions

By default TV Renamr will match shows in the formats: show.s0e00 and show.0x00 but you can specify custom regular expressions if your files aren't in either of these formats. Some custom regular expression syntax has been used to help you specify different parts of the filename:

 * Show: %n - (?P[\w\s.,_-]+)
 * Season: %s - (?P[\d]{1,2})
 * Episode: %e - (?P[\d]{2})

It is also possible to specify how many digits there are in the season and episode sections of the filename using the syntax:

 * Season: %s{n}
 * Episode: %e{n}

where the n in {n} specifies how many digits are in each of the sections.

Note: All spaces are converted to periods before your regular expression is run.
Last updated on June 12th, 2012

#TV shows #rename shows #TV #show #renamer #cleaner

0 User reviews so far.