mkv-episode-matcher 0.1.13__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mkv-episode-matcher might be problematic. Click here for more details.

Files changed (153) hide show
  1. mkv_episode_matcher-0.3.0/.coverage +0 -0
  2. mkv_episode_matcher-0.3.0/.github/workflows/documentation.yml +41 -0
  3. mkv_episode_matcher-0.3.0/.python-version +1 -0
  4. mkv_episode_matcher-0.3.0/.vscode/settings.json +15 -0
  5. mkv_episode_matcher-0.3.0/PKG-INFO +119 -0
  6. mkv_episode_matcher-0.3.0/README.md +90 -0
  7. mkv_episode_matcher-0.3.0/docs/api/index.md +38 -0
  8. mkv_episode_matcher-0.3.0/docs/cli.md +91 -0
  9. mkv_episode_matcher-0.3.0/docs/configuration.md +105 -0
  10. mkv_episode_matcher-0.3.0/docs/installation.md +81 -0
  11. mkv_episode_matcher-0.3.0/docs/quickstart.md +79 -0
  12. mkv_episode_matcher-0.3.0/docs/tips.md +152 -0
  13. mkv_episode_matcher-0.3.0/mkdocs.yml +82 -0
  14. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher/__main__.py +8 -4
  15. mkv_episode_matcher-0.3.0/mkv_episode_matcher/episode_identification.py +208 -0
  16. mkv_episode_matcher-0.3.0/mkv_episode_matcher/episode_matcher.py +117 -0
  17. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher/libraries/pgs2srt/Libraries/SubZero/SubZero.py +38 -12
  18. mkv_episode_matcher-0.3.0/mkv_episode_matcher/libraries/pgs2srt/Libraries/SubZero/dictionaries/data.py +16700 -0
  19. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher/libraries/pgs2srt/Libraries/SubZero/post_processing.py +125 -80
  20. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher/libraries/pgs2srt/imagemaker.py +7 -5
  21. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher/libraries/pgs2srt/pgs2srt.py +49 -20
  22. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher/libraries/pgs2srt/pgsreader.py +53 -49
  23. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher/mkv_to_srt.py +150 -22
  24. mkv_episode_matcher-0.3.0/mkv_episode_matcher/speech_to_text.py +90 -0
  25. mkv_episode_matcher-0.3.0/mkv_episode_matcher/utils.py +384 -0
  26. mkv_episode_matcher-0.3.0/mkv_episode_matcher.egg-info/PKG-INFO +119 -0
  27. mkv_episode_matcher-0.3.0/mkv_episode_matcher.egg-info/SOURCES.txt +59 -0
  28. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher.egg-info/requires.txt +3 -1
  29. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/pyproject.toml +50 -11
  30. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/setup.cfg +3 -3
  31. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/setup.py +3 -2
  32. mkv_episode_matcher-0.3.0/tests/test_improvements.py +59 -0
  33. mkv_episode_matcher-0.3.0/uv.lock +1375 -0
  34. mkv_episode_matcher-0.1.13/.python-version +0 -1
  35. mkv_episode_matcher-0.1.13/.readthedocs.yml +0 -34
  36. mkv_episode_matcher-0.1.13/.vscode/settings.json +0 -11
  37. mkv_episode_matcher-0.1.13/PKG-INFO +0 -113
  38. mkv_episode_matcher-0.1.13/README.rst +0 -86
  39. mkv_episode_matcher-0.1.13/docs/Makefile +0 -20
  40. mkv_episode_matcher-0.1.13/docs/_build/doctrees/environment.pickle +0 -0
  41. mkv_episode_matcher-0.1.13/docs/_build/doctrees/index.doctree +0 -0
  42. mkv_episode_matcher-0.1.13/docs/_build/html/.buildinfo +0 -4
  43. mkv_episode_matcher-0.1.13/docs/_build/html/.doctrees/api.doctree +0 -0
  44. mkv_episode_matcher-0.1.13/docs/_build/html/.doctrees/environment.pickle +0 -0
  45. mkv_episode_matcher-0.1.13/docs/_build/html/.doctrees/generated/mkv_episode_matcher.doctree +0 -0
  46. mkv_episode_matcher-0.1.13/docs/_build/html/.doctrees/index.doctree +0 -0
  47. mkv_episode_matcher-0.1.13/docs/_build/html/.doctrees/mkv_episode_matcher.doctree +0 -0
  48. mkv_episode_matcher-0.1.13/docs/_build/html/.doctrees/readme.doctree +0 -0
  49. mkv_episode_matcher-0.1.13/docs/_build/html/_sources/api.rst.txt +0 -55
  50. mkv_episode_matcher-0.1.13/docs/_build/html/_sources/generated/mkv_episode_matcher.rst.txt +0 -23
  51. mkv_episode_matcher-0.1.13/docs/_build/html/_sources/index.rst.txt +0 -19
  52. mkv_episode_matcher-0.1.13/docs/_build/html/_sources/mkv_episode_matcher.rst.txt +0 -23
  53. mkv_episode_matcher-0.1.13/docs/_build/html/_sources/readme.rst.txt +0 -7
  54. mkv_episode_matcher-0.1.13/docs/_build/html/_static/_sphinx_javascript_frameworks_compat.js +0 -123
  55. mkv_episode_matcher-0.1.13/docs/_build/html/_static/alabaster.css +0 -708
  56. mkv_episode_matcher-0.1.13/docs/_build/html/_static/basic.css +0 -925
  57. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/badge_only.css +0 -1
  58. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
  59. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
  60. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
  61. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
  62. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/fonts/fontawesome-webfont.eot +0 -0
  63. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/fonts/fontawesome-webfont.svg +0 -2671
  64. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/fonts/fontawesome-webfont.ttf +0 -0
  65. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff +0 -0
  66. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
  67. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/fonts/lato-bold-italic.woff +0 -0
  68. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/fonts/lato-bold-italic.woff2 +0 -0
  69. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/fonts/lato-bold.woff +0 -0
  70. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/fonts/lato-bold.woff2 +0 -0
  71. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/fonts/lato-normal-italic.woff +0 -0
  72. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/fonts/lato-normal-italic.woff2 +0 -0
  73. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/fonts/lato-normal.woff +0 -0
  74. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/fonts/lato-normal.woff2 +0 -0
  75. mkv_episode_matcher-0.1.13/docs/_build/html/_static/css/theme.css +0 -4
  76. mkv_episode_matcher-0.1.13/docs/_build/html/_static/custom.css +0 -1
  77. mkv_episode_matcher-0.1.13/docs/_build/html/_static/debug.css +0 -69
  78. mkv_episode_matcher-0.1.13/docs/_build/html/_static/doctools.js +0 -156
  79. mkv_episode_matcher-0.1.13/docs/_build/html/_static/documentation_options.js +0 -13
  80. mkv_episode_matcher-0.1.13/docs/_build/html/_static/file.png +0 -0
  81. mkv_episode_matcher-0.1.13/docs/_build/html/_static/jquery.js +0 -2
  82. mkv_episode_matcher-0.1.13/docs/_build/html/_static/js/badge_only.js +0 -1
  83. mkv_episode_matcher-0.1.13/docs/_build/html/_static/js/html5shiv-printshiv.min.js +0 -4
  84. mkv_episode_matcher-0.1.13/docs/_build/html/_static/js/html5shiv.min.js +0 -4
  85. mkv_episode_matcher-0.1.13/docs/_build/html/_static/js/theme.js +0 -1
  86. mkv_episode_matcher-0.1.13/docs/_build/html/_static/language_data.js +0 -199
  87. mkv_episode_matcher-0.1.13/docs/_build/html/_static/minus.png +0 -0
  88. mkv_episode_matcher-0.1.13/docs/_build/html/_static/plus.png +0 -0
  89. mkv_episode_matcher-0.1.13/docs/_build/html/_static/pygments.css +0 -75
  90. mkv_episode_matcher-0.1.13/docs/_build/html/_static/scripts/furo-extensions.js +0 -0
  91. mkv_episode_matcher-0.1.13/docs/_build/html/_static/scripts/furo.js +0 -3
  92. mkv_episode_matcher-0.1.13/docs/_build/html/_static/scripts/furo.js.LICENSE.txt +0 -7
  93. mkv_episode_matcher-0.1.13/docs/_build/html/_static/scripts/furo.js.map +0 -1
  94. mkv_episode_matcher-0.1.13/docs/_build/html/_static/searchtools.js +0 -619
  95. mkv_episode_matcher-0.1.13/docs/_build/html/_static/skeleton.css +0 -296
  96. mkv_episode_matcher-0.1.13/docs/_build/html/_static/sphinx_highlight.js +0 -154
  97. mkv_episode_matcher-0.1.13/docs/_build/html/_static/styles/furo-extensions.css +0 -2
  98. mkv_episode_matcher-0.1.13/docs/_build/html/_static/styles/furo-extensions.css.map +0 -1
  99. mkv_episode_matcher-0.1.13/docs/_build/html/_static/styles/furo.css +0 -2
  100. mkv_episode_matcher-0.1.13/docs/_build/html/_static/styles/furo.css.map +0 -1
  101. mkv_episode_matcher-0.1.13/docs/_build/html/api.html +0 -633
  102. mkv_episode_matcher-0.1.13/docs/_build/html/generated/mkv_episode_matcher.html +0 -113
  103. mkv_episode_matcher-0.1.13/docs/_build/html/genindex.html +0 -301
  104. mkv_episode_matcher-0.1.13/docs/_build/html/index.html +0 -138
  105. mkv_episode_matcher-0.1.13/docs/_build/html/mkv_episode_matcher.html +0 -106
  106. mkv_episode_matcher-0.1.13/docs/_build/html/objects.inv +0 -0
  107. mkv_episode_matcher-0.1.13/docs/_build/html/py-modindex.html +0 -152
  108. mkv_episode_matcher-0.1.13/docs/_build/html/readme.html +0 -197
  109. mkv_episode_matcher-0.1.13/docs/_build/html/search.html +0 -122
  110. mkv_episode_matcher-0.1.13/docs/_build/html/searchindex.js +0 -1
  111. mkv_episode_matcher-0.1.13/docs/api.rst +0 -55
  112. mkv_episode_matcher-0.1.13/docs/conf.py +0 -35
  113. mkv_episode_matcher-0.1.13/docs/generated/mkv_episode_matcher.rst +0 -23
  114. mkv_episode_matcher-0.1.13/docs/index.rst +0 -19
  115. mkv_episode_matcher-0.1.13/docs/make.bat +0 -35
  116. mkv_episode_matcher-0.1.13/docs/mkv_episode_matcher.rst +0 -23
  117. mkv_episode_matcher-0.1.13/docs/readme.rst +0 -7
  118. mkv_episode_matcher-0.1.13/docs/requirements.txt +0 -10
  119. mkv_episode_matcher-0.1.13/mkv_episode_matcher/episode_matcher.py +0 -261
  120. mkv_episode_matcher-0.1.13/mkv_episode_matcher/libraries/pgs2srt/Libraries/SubZero/dictionaries/data.py +0 -249
  121. mkv_episode_matcher-0.1.13/mkv_episode_matcher/notebooks/get_subtitles_test.ipynb +0 -252
  122. mkv_episode_matcher-0.1.13/mkv_episode_matcher/notebooks/whisper.ipynb +0 -122
  123. mkv_episode_matcher-0.1.13/mkv_episode_matcher/utils.py +0 -236
  124. mkv_episode_matcher-0.1.13/mkv_episode_matcher.egg-info/PKG-INFO +0 -113
  125. mkv_episode_matcher-0.1.13/mkv_episode_matcher.egg-info/SOURCES.txt +0 -130
  126. mkv_episode_matcher-0.1.13/uv.lock +0 -395
  127. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/.gitattributes +0 -0
  128. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/.github/funding.yml +0 -0
  129. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/.github/workflows/python-publish.yml +0 -0
  130. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/.gitignore +0 -0
  131. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/.gitmodules +0 -0
  132. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/dist/mkv_episode_matcher-0.1.1-py3-none-any.whl +0 -0
  133. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/dist/mkv_episode_matcher-0.1.1.tar.gz +0 -0
  134. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/dist/mkv_episode_matcher-0.1.2-py3-none-any.whl +0 -0
  135. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/dist/mkv_episode_matcher-0.1.2.tar.gz +0 -0
  136. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/dist/mkv_episode_matcher-0.1.3-py3-none-any.whl +0 -0
  137. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/dist/mkv_episode_matcher-0.1.3.tar.gz +0 -0
  138. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/dist/mkv_episode_matcher-0.1.4-py3-none-any.whl +0 -0
  139. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/dist/mkv_episode_matcher-0.1.4.tar.gz +0 -0
  140. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/dist/mkv_episode_matcher-0.1.5-py3-none-any.whl +0 -0
  141. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/dist/mkv_episode_matcher-0.1.5.tar.gz +0 -0
  142. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher/.gitattributes +0 -0
  143. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher/__init__.py +0 -0
  144. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher/config.py +0 -0
  145. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher/libraries/pgs2srt/.gitignore +0 -0
  146. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher/libraries/pgs2srt/README.md +0 -0
  147. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher/libraries/pgs2srt/__init__.py +0 -0
  148. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher/libraries/pgs2srt/requirements.txt +0 -0
  149. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher/tmdb_client.py +0 -0
  150. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher.egg-info/dependency_links.txt +0 -0
  151. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher.egg-info/entry_points.txt +0 -0
  152. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/mkv_episode_matcher.egg-info/top_level.txt +0 -0
  153. {mkv_episode_matcher-0.1.13 → mkv_episode_matcher-0.3.0}/tests/__init__.py +0 -0
Binary file
@@ -0,0 +1,41 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ jobs:
12
+ deploy:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ with:
17
+ fetch-depth: 0
18
+
19
+ - name: Configure Git
20
+ run: |
21
+ git config --global user.name "github-actions[bot]"
22
+ git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
23
+
24
+ - name: Set up Python
25
+ uses: actions/setup-python@v4
26
+ with:
27
+ python-version: "3.12"
28
+
29
+ - name: Install dependencies
30
+ run: |
31
+ pip install mkdocs-material
32
+ pip install mkdocstrings[python]
33
+ pip install .
34
+
35
+ - name: Setup docs directory
36
+ run: |
37
+ cd docs
38
+ ln -sf ../README.md .
39
+
40
+ - name: Deploy documentation
41
+ run: mkdocs gh-deploy --force
@@ -0,0 +1 @@
1
+ 3.9
@@ -0,0 +1,15 @@
1
+ {
2
+ "python.testing.pytestArgs": [
3
+ "python.testing.pytestArgs": [
4
+ ".",
5
+ "--rootdir=.",
6
+ "-v",
7
+ "--tb=short"
8
+ ],
9
+ "python.testing.autoTestDiscoverOnSaveEnabled": true,
10
+ "python.testing.pytestEnabled": true,
11
+ "python.testing.unittestEnabled": false,
12
+ "python.testing.pytestArgs": [
13
+ "tests"
14
+ ]
15
+ }
@@ -0,0 +1,119 @@
1
+ Metadata-Version: 2.1
2
+ Name: mkv-episode-matcher
3
+ Version: 0.3.0
4
+ Summary: The MKV Episode Matcher is a tool for identifying TV series episodes from MKV files and renaming the files accordingly.
5
+ Home-page: https://github.com/Jsakkos/mkv-episode-matcher
6
+ Author: Jonathan Sakkos
7
+ Author-email: Jsakkos <jonathansakkos@gmail.com>
8
+ License: MIT
9
+ Project-URL: Documentation, https://github.com/Jsakkos/mkv-episode-matcher#readme
10
+ Project-URL: Issues, https://github.com/Jsakkos/mkv-episode-matcher/issues
11
+ Project-URL: Source, https://github.com/Jsakkos/mkv-episode-matcher
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Programming Language :: Python
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: Implementation :: CPython
16
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
17
+ Requires-Python: >=3.9
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: configparser>=7.1.0
20
+ Requires-Dist: ffmpeg>=1.4
21
+ Requires-Dist: loguru>=0.7.2
22
+ Requires-Dist: openai-whisper>=20240930
23
+ Requires-Dist: opensubtitlescom>=0.1.5
24
+ Requires-Dist: pytesseract>=0.3.13
25
+ Requires-Dist: rapidfuzz>=3.10.1
26
+ Requires-Dist: requests>=2.32.3
27
+ Requires-Dist: tmdb-client>=0.0.1
28
+ Requires-Dist: wave>=0.0.2
29
+
30
+ # MKV Episode Matcher
31
+
32
+ [![Documentation Status](https://img.shields.io/github/actions/workflow/status/Jsakkos/mkv-episode-matcher/documentation.yml?label=docs)](https://jsakkos.github.io/mkv-episode-matcher/)
33
+ [![PyPI version](https://badge.fury.io/py/mkv-episode-matcher.svg)](https://badge.fury.io/py/mkv-episode-matcher)
34
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
35
+
36
+ Automatically match and rename your MKV TV episodes using The Movie Database (TMDb).
37
+
38
+ ## Features
39
+
40
+ - 🎯 **Automatic Episode Matching**: Uses TMDb to accurately identify episodes
41
+ - 📝 **Subtitle Extraction**: Extracts subtitles from MKV files
42
+ - 🔍 **OCR Support**: Handles image-based subtitles
43
+ - 🚀 **Multi-threaded**: Fast processing of multiple files
44
+ - ⬇️ **Subtitle Downloads**: Integration with OpenSubtitles
45
+ - ✨ **Bulk Processing**: Handle entire seasons at once
46
+ - 🧪 **Dry Run Mode**: Test changes before applying
47
+
48
+ ## Quick Start
49
+
50
+ 1. Install the package:
51
+ ```bash
52
+ pip install mkv-episode-matcher
53
+ ```
54
+
55
+ 2. Run on your show directory:
56
+ ```bash
57
+ mkv-match --show-dir "path/to/your/show" --season 1
58
+ ```
59
+
60
+ ## Requirements
61
+
62
+ - Python 3.8 or higher
63
+ - TMDb API key
64
+ - OpenSubtitles account (optional, for subtitle downloads)
65
+
66
+ ## Documentation
67
+
68
+ Full documentation is available at [https://jsakkos.github.io/mkv-episode-matcher/](https://jsakkos.github.io/mkv-episode-matcher/)
69
+
70
+ ## Basic Usage
71
+
72
+ ```python
73
+ from mkv_episode_matcher import process_show
74
+
75
+ # Process all seasons
76
+ process_show()
77
+
78
+ # Process specific season
79
+ process_show(season=1)
80
+
81
+ # Test run without making changes
82
+ process_show(season=1, dry_run=True)
83
+
84
+ # Process and download subtitles
85
+ process_show(get_subs=True)
86
+ ```
87
+
88
+ ## Directory Structure
89
+
90
+ MKV Episode Matcher expects your TV shows to be organized as follows:
91
+
92
+ ```
93
+ Show Name/
94
+ ├── Season 1/
95
+ │ ├── episode1.mkv
96
+ │ ├── episode2.mkv
97
+ ├── Season 2/
98
+ │ ├── episode1.mkv
99
+ │ └── episode2.mkv
100
+ ```
101
+
102
+ ## Contributing
103
+
104
+ 1. Fork the repository
105
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
106
+ 3. Commit your changes (`git commit -m 'Add amazing feature'`)
107
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
108
+ 5. Open a Pull Request
109
+
110
+ ## License
111
+
112
+ Distributed under the MIT License. See `LICENSE` for more information.
113
+
114
+ ## Acknowledgments
115
+
116
+ - [TMDb](https://www.themoviedb.org/) for their excellent API
117
+ - [OpenSubtitles](https://www.opensubtitles.com/) for subtitle integration
118
+ - All contributors who have helped improve this project
119
+
@@ -0,0 +1,90 @@
1
+ # MKV Episode Matcher
2
+
3
+ [![Documentation Status](https://img.shields.io/github/actions/workflow/status/Jsakkos/mkv-episode-matcher/documentation.yml?label=docs)](https://jsakkos.github.io/mkv-episode-matcher/)
4
+ [![PyPI version](https://badge.fury.io/py/mkv-episode-matcher.svg)](https://badge.fury.io/py/mkv-episode-matcher)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ Automatically match and rename your MKV TV episodes using The Movie Database (TMDb).
8
+
9
+ ## Features
10
+
11
+ - 🎯 **Automatic Episode Matching**: Uses TMDb to accurately identify episodes
12
+ - 📝 **Subtitle Extraction**: Extracts subtitles from MKV files
13
+ - 🔍 **OCR Support**: Handles image-based subtitles
14
+ - 🚀 **Multi-threaded**: Fast processing of multiple files
15
+ - ⬇️ **Subtitle Downloads**: Integration with OpenSubtitles
16
+ - ✨ **Bulk Processing**: Handle entire seasons at once
17
+ - 🧪 **Dry Run Mode**: Test changes before applying
18
+
19
+ ## Quick Start
20
+
21
+ 1. Install the package:
22
+ ```bash
23
+ pip install mkv-episode-matcher
24
+ ```
25
+
26
+ 2. Run on your show directory:
27
+ ```bash
28
+ mkv-match --show-dir "path/to/your/show" --season 1
29
+ ```
30
+
31
+ ## Requirements
32
+
33
+ - Python 3.8 or higher
34
+ - TMDb API key
35
+ - OpenSubtitles account (optional, for subtitle downloads)
36
+
37
+ ## Documentation
38
+
39
+ Full documentation is available at [https://jsakkos.github.io/mkv-episode-matcher/](https://jsakkos.github.io/mkv-episode-matcher/)
40
+
41
+ ## Basic Usage
42
+
43
+ ```python
44
+ from mkv_episode_matcher import process_show
45
+
46
+ # Process all seasons
47
+ process_show()
48
+
49
+ # Process specific season
50
+ process_show(season=1)
51
+
52
+ # Test run without making changes
53
+ process_show(season=1, dry_run=True)
54
+
55
+ # Process and download subtitles
56
+ process_show(get_subs=True)
57
+ ```
58
+
59
+ ## Directory Structure
60
+
61
+ MKV Episode Matcher expects your TV shows to be organized as follows:
62
+
63
+ ```
64
+ Show Name/
65
+ ├── Season 1/
66
+ │ ├── episode1.mkv
67
+ │ ├── episode2.mkv
68
+ ├── Season 2/
69
+ │ ├── episode1.mkv
70
+ │ └── episode2.mkv
71
+ ```
72
+
73
+ ## Contributing
74
+
75
+ 1. Fork the repository
76
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
77
+ 3. Commit your changes (`git commit -m 'Add amazing feature'`)
78
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
79
+ 5. Open a Pull Request
80
+
81
+ ## License
82
+
83
+ Distributed under the MIT License. See `LICENSE` for more information.
84
+
85
+ ## Acknowledgments
86
+
87
+ - [TMDb](https://www.themoviedb.org/) for their excellent API
88
+ - [OpenSubtitles](https://www.opensubtitles.com/) for subtitle integration
89
+ - All contributors who have helped improve this project
90
+
@@ -0,0 +1,38 @@
1
+ # API Reference
2
+
3
+ This section contains the automatically generated API documentation for MKV Episode Matcher.
4
+
5
+ ## Core Modules
6
+
7
+ ::: mkv_episode_matcher.episode_matcher
8
+ options:
9
+ show_root_heading: true
10
+ heading_level: 2
11
+
12
+ ## TMDB Client
13
+
14
+ ::: mkv_episode_matcher.tmdb_client
15
+ options:
16
+ show_root_heading: true
17
+ heading_level: 2
18
+
19
+ ## MKV Converter
20
+
21
+ ::: mkv_episode_matcher.mkv_to_srt
22
+ options:
23
+ show_root_heading: true
24
+ heading_level: 2
25
+
26
+ ## Utilities
27
+
28
+ ::: mkv_episode_matcher.utils
29
+ options:
30
+ show_root_heading: true
31
+ heading_level: 2
32
+
33
+ ## Configuration
34
+
35
+ ::: mkv_episode_matcher.config
36
+ options:
37
+ show_root_heading: true
38
+ heading_level: 2
@@ -0,0 +1,91 @@
1
+ # Command Line Interface
2
+
3
+ ## Basic Commands
4
+
5
+ ### Process Show
6
+
7
+ ```bash
8
+ mkv-match --show-dir "/path/to/show"
9
+ ```
10
+
11
+ ### Process Specific Season
12
+
13
+ ```bash
14
+ mkv-match --show-dir "/path/to/show" --season 1
15
+ ```
16
+
17
+ ## Command Options
18
+
19
+ | Option | Description | Default |
20
+ |--------|-------------|---------|
21
+ | `--show-dir` | Show directory path | None |
22
+ | `--season` | Season number to process | None (all) |
23
+ | `--dry-run` | Test without making changes | False |
24
+ | `--get-subs` | Download subtitles | False |
25
+ | `--tmdb-api-key` | TMDb API key | None |
26
+ | `--tesseract-path` | Path to Tesseract | None |
27
+
28
+ ## Examples
29
+
30
+ ### Dry Run Mode
31
+
32
+ ```bash
33
+ mkv-match --show-dir "/path/to/show" --dry-run true
34
+ ```
35
+
36
+ ### Download Subtitles
37
+
38
+ ```bash
39
+ mkv-match --show-dir "/path/to/show" --get-subs true
40
+ ```
41
+
42
+ ### Set API Key
43
+
44
+ ```bash
45
+ mkv-match --show-dir "/path/to/show" --tmdb-api-key "your_key"
46
+ ```
47
+
48
+ ### Multiple Options
49
+
50
+ ```bash
51
+ mkv-match \
52
+ --show-dir "/path/to/show" \
53
+ --season 1 \
54
+ --get-subs true \
55
+ --dry-run true
56
+ ```
57
+
58
+ ## Environment Variables
59
+
60
+ Alternative to command line options:
61
+
62
+ ```bash
63
+ export TMDB_API_KEY="your_key"
64
+ export SHOW_DIR="/path/to/shows"
65
+ mkv-match
66
+ ```
67
+
68
+ ## Exit Codes
69
+
70
+ | Code | Meaning |
71
+ |------|---------|
72
+ | 0 | Success |
73
+ | 1 | General error |
74
+ | 2 | Configuration error |
75
+ | 3 | API error |
76
+
77
+ ## Logging
78
+
79
+ Logs are stored in:
80
+ ```
81
+ ~/.mkv-episode-matcher/logs/
82
+ ├── stdout.log
83
+ └── stderr.log
84
+ ```
85
+
86
+ ## Tips
87
+
88
+ 1. Always use quotes around paths
89
+ 2. Use dry-run first to test
90
+ 3. Check logs for details
91
+ 4. Use full paths for reliability
@@ -0,0 +1,105 @@
1
+ # Configuration Guide
2
+
3
+ ## Configuration File
4
+
5
+ MKV Episode Matcher uses a configuration file located at:
6
+
7
+ - Windows: `%USERPROFILE%\.mkv-episode-matcher\config.ini`
8
+ - Linux/Mac: `~/.mkv-episode-matcher/config.ini`
9
+
10
+ ## Configuration Options
11
+
12
+ ```ini
13
+ [Config]
14
+ # Required Settings
15
+ tmdb_api_key = your_tmdb_api_key
16
+ show_dir = /path/to/shows
17
+
18
+ # Optional Settings
19
+ max_threads = 4
20
+ open_subtitles_api_key = your_opensubs_key
21
+ open_subtitles_user_agent = your_user_agent
22
+ open_subtitles_username = your_username
23
+ open_subtitles_password = your_password
24
+ tesseract_path = /path/to/tesseract
25
+ ```
26
+
27
+ ## Command Line Configuration
28
+
29
+ All configuration options can be set via command line:
30
+
31
+ ```bash
32
+ mkv-match \
33
+ --tmdb-api-key "your_key" \
34
+ --show-dir "/path/to/shows" \
35
+ --season 1 \
36
+ --dry-run true \
37
+ --get-subs true \
38
+ --tesseract-path "/path/to/tesseract"
39
+ ```
40
+
41
+ ## Environment Variables
42
+
43
+ You can also use environment variables:
44
+
45
+ ```bash
46
+ export TMDB_API_KEY="your_key"
47
+ export SHOW_DIR="/path/to/shows"
48
+ export OPEN_SUBTITLES_API_KEY="your_key"
49
+ ```
50
+
51
+ ## Configuration Priority
52
+
53
+ Settings are loaded in the following order (later overrides earlier):
54
+
55
+ 1. Default values
56
+ 2. Configuration file
57
+ 3. Environment variables
58
+ 4. Command line arguments
59
+
60
+ ## Detailed Options
61
+
62
+ ### TMDb Configuration
63
+
64
+ ```ini
65
+ [Config]
66
+ tmdb_api_key = your_api_key
67
+ ```
68
+
69
+ The TMDb API key is required for:
70
+ - Show identification
71
+ - Episode information
72
+ - Season details
73
+
74
+ ### OpenSubtitles Configuration
75
+
76
+ ```ini
77
+ [Config]
78
+ open_subtitles_api_key = your_key
79
+ open_subtitles_user_agent = your_agent
80
+ open_subtitles_username = username
81
+ open_subtitles_password = password
82
+ ```
83
+
84
+ Required only if using subtitle download functionality.
85
+
86
+ ### Performance Settings
87
+
88
+ ```ini
89
+ [Config]
90
+ max_threads = 4
91
+ ```
92
+
93
+ Adjust based on your system's capabilities:
94
+ - Default: 4 threads
95
+ - Minimum: 1 thread
96
+ - Maximum: Number of CPU cores
97
+
98
+ ### OCR Configuration
99
+
100
+ ```ini
101
+ [Config]
102
+ tesseract_path = /path/to/tesseract
103
+ ```
104
+
105
+ Required only if processing image-based subtitles.
@@ -0,0 +1,81 @@
1
+ # Installation Guide
2
+
3
+ ## Basic Installation
4
+
5
+ Install MKV Episode Matcher using pip:
6
+
7
+ ```bash
8
+ pip install mkv-episode-matcher
9
+ ```
10
+
11
+ ## Installation Options
12
+
13
+ ### GPU Support
14
+
15
+ For GPU acceleration (recommended if you have a CUDA-capable GPU):
16
+
17
+ ```bash
18
+ pip install "mkv-episode-matcher"
19
+ ```
20
+ Find the appropriate CUDA version and upgrade Torch (e.g., for CUDA 12.4):
21
+ ```bash
22
+ pip install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
23
+ ```
24
+
25
+
26
+ ### Development Installation
27
+
28
+ For contributing or development:
29
+
30
+ ```bash
31
+ # Clone the repository
32
+ git clone https://github.com/Jsakkos/mkv-episode-matcher.git
33
+ cd mkv-episode-matcher
34
+
35
+ # Install UV
36
+ pip install uv
37
+
38
+ # Install with development dependencies
39
+ uv venv
40
+ uv pip install -e ".[dev]"
41
+ ```
42
+
43
+ ## API Keys Setup
44
+
45
+ 1. **TMDb API Key**
46
+ - Create an account at [TMDb](https://www.themoviedb.org/)
47
+ - Go to your account settings
48
+ - Request an API key
49
+
50
+ 2. **OpenSubtitles (Optional)**
51
+ - Register at [OpenSubtitles](https://www.opensubtitles.com/)
52
+ - Get your API key from the dashboard
53
+
54
+ ## System Requirements
55
+
56
+ ### For GPU Support
57
+ - CUDA-capable NVIDIA GPU
58
+ - CUDA Toolkit 12.1 or compatible version
59
+ - At least 4GB GPU memory recommended for Whisper speech recognition
60
+
61
+ ### For CPU-Only
62
+ - No special requirements beyond Python 3.9+
63
+
64
+ ## Verification
65
+
66
+ Verify your installation:
67
+
68
+ ```bash
69
+ mkv-match --version
70
+
71
+ # Check GPU availability (if installed with GPU support)
72
+ python -c "import torch; print(f'GPU available: {torch.cuda.is_available()}')"
73
+ ```
74
+
75
+ ## Troubleshooting
76
+
77
+ If you encounter any issues:
78
+ 1. Ensure you have the latest pip: `pip install --upgrade pip`
79
+ 2. For GPU installations, verify CUDA is properly installed
80
+ 3. Check the [compatibility matrix](https://pytorch.org/get-started/locally/) for PyTorch and CUDA versions
81
+ 4. If you encounter any other issues, please [open an issue](https://github.com/Jsakkos/mkv-episode-matcher/issues) on GitHub
@@ -0,0 +1,79 @@
1
+ # Quick Start Guide
2
+
3
+ Get started with MKV Episode Matcher in minutes.
4
+
5
+ ## Basic Usage
6
+
7
+ ### 1. Process a Single Season
8
+
9
+ ```bash
10
+ mkv-match --show-dir "/path/to/show" --season 1
11
+ ```
12
+
13
+ ### 2. Process All Seasons
14
+
15
+ ```bash
16
+ mkv-match --show-dir "/path/to/show"
17
+ ```
18
+
19
+ ### 3. Test Run (No Changes)
20
+
21
+ ```bash
22
+ mkv-match --show-dir "/path/to/show" --dry-run true
23
+ ```
24
+
25
+ ### 4. Download Subtitles
26
+
27
+ ```bash
28
+ mkv-match --show-dir "/path/to/show" --get-subs true
29
+ ```
30
+
31
+ ## Directory Structure
32
+
33
+ MKV Episode Matcher expects your TV shows to be organized as follows:
34
+
35
+ ```
36
+ Show Name/
37
+ ├── Season 1/
38
+ │ ├── episode1.mkv
39
+ │ ├── episode2.mkv
40
+ ├── Season 2/
41
+ │ ├── episode1.mkv
42
+ │ └── episode2.mkv
43
+ ```
44
+
45
+ ## Python API Usage
46
+
47
+ ```python
48
+ from mkv_episode_matcher import process_show
49
+
50
+ # Process all seasons
51
+ process_show()
52
+
53
+ # Process specific season
54
+ process_show(season=1)
55
+
56
+ # Test run
57
+ process_show(season=1, dry_run=True)
58
+
59
+ # With subtitles
60
+ process_show(season=1, get_subs=True)
61
+ ```
62
+
63
+ ## Configuration
64
+
65
+ Create a configuration file at `~/.mkv-episode-matcher/config.ini`:
66
+
67
+ ```ini
68
+ [Config]
69
+ tmdb_api_key = your_api_key
70
+ open_subtitles_api_key = your_opensubs_key
71
+ show_dir = /path/to/shows
72
+ max_threads = 4
73
+ ```
74
+
75
+ ## Next Steps
76
+
77
+ - Check the [Configuration Guide](configuration.md) for detailed setup
78
+ - See [Tips and Tricks](tips.md) for advanced usage
79
+ - Browse the [API Reference](api/episode_matcher.md) for detailed documentation