{"id":22294177,"url":"https://github.com/j-holub/koditvshownamer","last_synced_at":"2025-08-25T20:12:14.835Z","repository":{"id":147704183,"uuid":"68327760","full_name":"j-holub/KodiTVShowNamer","owner":"j-holub","description":"A small python script to name TV show episodes the way Kodi wants them","archived":false,"fork":false,"pushed_at":"2016-09-15T21:30:14.000Z","size":4,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T19:29:33.370Z","etag":null,"topics":["kodi","script","tv-renamer"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/j-holub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-15T20:11:50.000Z","updated_at":"2022-01-01T17:32:35.000Z","dependencies_parsed_at":"2023-05-27T04:45:35.352Z","dependency_job_id":null,"html_url":"https://github.com/j-holub/KodiTVShowNamer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-holub%2FKodiTVShowNamer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-holub%2FKodiTVShowNamer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-holub%2FKodiTVShowNamer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-holub%2FKodiTVShowNamer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j-holub","download_url":"https://codeload.github.com/j-holub/KodiTVShowNamer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245550681,"owners_count":20633883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kodi","script","tv-renamer"],"created_at":"2024-12-03T17:35:12.709Z","updated_at":"2025-03-25T22:19:27.290Z","avatar_url":"https://github.com/j-holub.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kodi TV Show Namer\n\nThis is a small Python script to rename TV show episodes in a way, that the [Kodi](https://kodi.tv) scraper will correctly parse the information.\n\nThe episodes will be in the following format (assuming that the original file was an mkv).\n\n```\nshowname.epXX.YEAR.mkv\n```\nor if the season should be included\n\n```\nshowname.sX.eXX.YEAR.mkv\n```\n\nThis script will also rename subtitle files of the types `srt`, `ass`, `sub` and `idx` and a language suffix can be added.\n\n\n\n## Install\n\nClone the repository.\n\n```\ngit clone https://github.com/00SteinsGate00/KodiTVShowNamer.git\n```\n\nTo install the script, just copy it to `/usr/bin` and give it the correct permissions.\n\nFrom inside the repository's directory run\n\n```\nsudo cp KodiTVShowNamer.py /usr/bin/koditvshownamer\nsudo chmod +x /usr/bin/koditvshownamer\n```\n\n\n## Usage\n\nThe basic usage is\n\n```\nkoditvshownamer \u003cdirectory\u003e \u003ctvshow name\u003e\n```\n\nThis will check all files inside `\u003cdirectory\u003e` and rename them into `\u003ctvshow name\u003e.epXX.mkv`.\n\nTo determine the episode number the files are checked for the pattern `epXX`. A different Regular Expression can be specified.\n\n\n### Options\n\n| Option | Alternative | Effect | Discription |\n| ------ | ----------- | ------ | ----------- |\n| `-r`   | `--regex`   | RegEx  | Specifies the regular expression to find the episode number in the original file |\n| `-y`   | `--year`    | Year   | The year the tv show was released |\n| `-s`   | `--season`  | Season | The season number |\n| `-su`  | `--subitle` | Subtitle language | To add a language suffix to the subitlte files |\n\nYou can also display the possible parameters using\n\n```\nkoditvshownamer --help\n```\n\n### Regular Expression for Finding the Episode Number\n\nSince your TV show files can have any arbitray way the episode numbers are formatted, you can specify a regular expression to match them.\n\nHere you find some basic ones, that occur quite often\n\n| RegEx | Description | Example |\n| ----- | ----------- | ------- |\n| `e[0-2][0-9]` | Starting with e and followed by 2 numbers | showA_e12.mkv |\n| `- ep[0-2][0-9] -` | Episode titles are enclosed by `-` | showA - ep22 - title.mkv |\n| `台[0-2][0-9]話` | Basically the way Japanese episodes are numbered | 番組A第２話.mkv |\n\nGiven those examples it should easy to build the ones you need. Here you can find some useful information on how to construct the fitting regular expressions: [regexr.com](http://regexr.com).\n\n\n## Examples\n\nHere you can find some examples on how to use this script. Once you got the hang of it, it's really simple to use but saves you a lot of time.\n\n### Basic\n\n```\nkoditvshownamer . \"SteinsGate\" -y 2010\n```\nEpisodes will have the form `SteinsGate.epXX.2010.mkv`\n\n### With RegEx\n\n\n```\nkoditvshownamer . \"Battlestar Galactica\" -s 1 -r \"E[0-2][0-9]\"\n```\nEpisodes will have the form `Battlestar Galactica.s1.eXX.mkv`. Here a Regular Expression was used to determine episode numbers. The original files could have looked something like `bsg E12.mkv`.\n\n### With Subtitles\n\n```\nkoditvshownamer . \"太陽の歌\" -r \"台[0-1][0-9]話\" -su en\n```\n\nThis will result in video files in the form `太陽の歌.epXX.mkv` and the subtitle files will have the language suffix attached: `太陽の歌.epXX.en.srt`.\n\n\n## Licence\n\n[MIT Licence](LICENCE.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-holub%2Fkoditvshownamer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj-holub%2Fkoditvshownamer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-holub%2Fkoditvshownamer/lists"}