mkv-episode-matcher 0.1.12__py3-none-any.whl → 0.2.0__py3-none-any.whl

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.

@@ -1,122 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": 1,
6
- "metadata": {},
7
- "outputs": [
8
- {
9
- "ename": "OSError",
10
- "evalue": "[WinError 126] The specified module could not be found. Error loading \"c:\\Users\\Jonathan\\anaconda3\\envs\\whisper\\Lib\\site-packages\\torch\\lib\\fbgemm.dll\" or one of its dependencies.",
11
- "output_type": "error",
12
- "traceback": [
13
- "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
14
- "\u001b[1;31mOSError\u001b[0m Traceback (most recent call last)",
15
- "Cell \u001b[1;32mIn[1], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mwhisper\u001b[39;00m\n\u001b[0;32m 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mos\u001b[39;00m\n",
16
- "File \u001b[1;32mc:\\Users\\Jonathan\\anaconda3\\envs\\whisper\\Lib\\site-packages\\whisper\\__init__.py:8\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mwarnings\u001b[39;00m\n\u001b[0;32m 6\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mtyping\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m List, Optional, Union\n\u001b[1;32m----> 8\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mtorch\u001b[39;00m\n\u001b[0;32m 9\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mtqdm\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m tqdm\n\u001b[0;32m 11\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01maudio\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m load_audio, log_mel_spectrogram, pad_or_trim\n",
17
- "File \u001b[1;32mc:\\Users\\Jonathan\\anaconda3\\envs\\whisper\\Lib\\site-packages\\torch\\__init__.py:148\u001b[0m\n\u001b[0;32m 146\u001b[0m err \u001b[38;5;241m=\u001b[39m ctypes\u001b[38;5;241m.\u001b[39mWinError(ctypes\u001b[38;5;241m.\u001b[39mget_last_error())\n\u001b[0;32m 147\u001b[0m err\u001b[38;5;241m.\u001b[39mstrerror \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m Error loading \u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mdll\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m or one of its dependencies.\u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[1;32m--> 148\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m err\n\u001b[0;32m 150\u001b[0m kernel32\u001b[38;5;241m.\u001b[39mSetErrorMode(prev_error_mode)\n\u001b[0;32m 153\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m_preload_cuda_deps\u001b[39m(lib_folder, lib_name):\n",
18
- "\u001b[1;31mOSError\u001b[0m: [WinError 126] The specified module could not be found. Error loading \"c:\\Users\\Jonathan\\anaconda3\\envs\\whisper\\Lib\\site-packages\\torch\\lib\\fbgemm.dll\" or one of its dependencies."
19
- ]
20
- }
21
- ],
22
- "source": [
23
- "import whisper\n",
24
- "import os\n",
25
- "\n"
26
- ]
27
- },
28
- {
29
- "cell_type": "code",
30
- "execution_count": null,
31
- "metadata": {},
32
- "outputs": [
33
- {
34
- "ename": "",
35
- "evalue": "",
36
- "output_type": "error",
37
- "traceback": [
38
- "\u001b[1;31mRunning cells with 'MKV-GPU (Python 3.8.10)' requires the ipykernel package.\n",
39
- "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
40
- "\u001b[1;31mCommand: 'conda install -n MKV-GPU ipykernel --update-deps --force-reinstall'"
41
- ]
42
- }
43
- ],
44
- "source": [
45
- "import torch\n",
46
- "\n",
47
- "if torch.cuda.is_available():\n",
48
- " print(f\"CUDA is available. Using GPU: {torch.cuda.get_device_name(0)}\")\n",
49
- "else:\n",
50
- " print(\"CUDA is not available. Using CPU.\")\n",
51
- "\n",
52
- "# It will print out the GPU that you are using."
53
- ]
54
- },
55
- {
56
- "cell_type": "code",
57
- "execution_count": null,
58
- "metadata": {},
59
- "outputs": [
60
- {
61
- "ename": "",
62
- "evalue": "",
63
- "output_type": "error",
64
- "traceback": [
65
- "\u001b[1;31mRunning cells with 'MKV-GPU (Python 3.8.10)' requires the ipykernel package.\n",
66
- "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
67
- "\u001b[1;31mCommand: 'conda install -n MKV-GPU ipykernel --update-deps --force-reinstall'"
68
- ]
69
- }
70
- ],
71
- "source": [
72
- "model = whisper.load_model(\"base\") # Replace \"base\" with the desired model size\n",
73
- "result = model.transcribe(r\"C:\\Users\\Jonathan\\output_audio.wav\")\n",
74
- "\n",
75
- "# Print or save the transcription\n",
76
- "print(result[\"text\"])"
77
- ]
78
- },
79
- {
80
- "cell_type": "code",
81
- "execution_count": null,
82
- "metadata": {},
83
- "outputs": [
84
- {
85
- "ename": "",
86
- "evalue": "",
87
- "output_type": "error",
88
- "traceback": [
89
- "\u001b[1;31mRunning cells with 'MKV-GPU (Python 3.8.10)' requires the ipykernel package.\n",
90
- "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
91
- "\u001b[1;31mCommand: 'conda install -n MKV-GPU ipykernel --update-deps --force-reinstall'"
92
- ]
93
- }
94
- ],
95
- "source": [
96
- "# ffmpeg -i \"E:\\Video\\Seinfeld\\Season 5\\Seinfeld - Season 5 (Disc 1)-A1_t02.mkv\" -t 300 -map 0:a:0 -acodec pcm_s16le -ac 1 output_audio.wav\n",
97
- "# works for make a .wav file of the first 5 mins"
98
- ]
99
- }
100
- ],
101
- "metadata": {
102
- "kernelspec": {
103
- "display_name": "mkv",
104
- "language": "python",
105
- "name": "python3"
106
- },
107
- "language_info": {
108
- "codemirror_mode": {
109
- "name": "ipython",
110
- "version": 3
111
- },
112
- "file_extension": ".py",
113
- "mimetype": "text/x-python",
114
- "name": "python",
115
- "nbconvert_exporter": "python",
116
- "pygments_lexer": "ipython3",
117
- "version": "3.11.9"
118
- }
119
- },
120
- "nbformat": 4,
121
- "nbformat_minor": 2
122
- }
@@ -1,7 +0,0 @@
1
- requests
2
- loguru
3
- pillow
4
- configparser
5
- tmdb_client
6
- pytesseract
7
- opensubtitlescom
@@ -1,113 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: mkv-episode-matcher
3
- Version: 0.1.12
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@protonmail.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.12
18
- Description-Content-Type: text/x-rst
19
- Requires-Dist: configparser>=7.1.0
20
- Requires-Dist: ffmpeg>=1.4
21
- Requires-Dist: loguru>=0.7.2
22
- Requires-Dist: numpy>=2.1.3
23
- Requires-Dist: opensubtitlescom>=0.1.5
24
- Requires-Dist: pytesseract>=0.3.13
25
- Requires-Dist: requests>=2.32.3
26
- Requires-Dist: tmdb-client>=0.0.1
27
-
28
- ===================
29
- MKV Episode Matcher
30
- ===================
31
-
32
- |docs| |pypi|
33
-
34
- The MKV Episode Matcher is a tool for identifying TV series episodes from MKV files and renaming the files accordingly.
35
-
36
- Quick start
37
- ===========
38
-
39
- To use the MKV Episode Matcher, follow these steps:
40
-
41
- 1. Install ``pip install mkv-episode-matcher``
42
- 2. Obtain an API key from TMDb (https://developers.themoviedb.org/authentication/getting-a-apikey).
43
- 3. (Optional) - Obtain an API key from Opensubtitles.com by creating an API consumer (https://www.opensubtitles.com/en/consumers)
44
- 4. Alternatively, add the .srt files to the cache directory. On Windows: ``C:\Users\YOUR_USER_NAME\.mkv-episode-matcher\cache\data\SHOW_NAME``. The files need to be named with the season and episode, e.g. ``Show Name - S01E01.srt``.
45
- 5. Provide a filepath to your show directory. This is the main directory that contains all of the episodes for a specific show.
46
-
47
- The directory and subfolders must be arranged in the following structure:
48
-
49
- - Show name
50
- - Season 1
51
- - Season 2
52
- - ...
53
- - Season n
54
-
55
- 6. Call ``mkv-match`` with the TMDB_API_KEY and SHOW_DIR as arguments or in environment variables from your command line:
56
-
57
- .. code-block:: bash
58
-
59
- python mkv-match --tmdb-api-key your-api-key --show-dir /path/to/show
60
-
61
- Once TMDB_API_KEY is set, there's no need to enter it again, as it gets stored in the config.ini file.
62
-
63
- To get subtitles from opensubtitles.com, ensure that the appropriate credentials have been set, either via the CLI or in config.ini (On Windows: ``C:\Users\YOUR_USER_NAME\.mkv-episode-matcher\config.ini``).
64
- Then add the ``--get-subs True`` flag to the CLI call
65
-
66
- .. code-block:: bash
67
-
68
- python mkv-match --show-dir /path/to/show --get-subs True
69
-
70
- How it works
71
- ============
72
-
73
- MKV Episode Matcher extracts the subtitle text from each MKV file, then cross-references the text against .srt subtitle files that are either user-provided or downloaded from Opensubtitles.com.
74
-
75
- License
76
- =======
77
-
78
- MIT License
79
-
80
- Copyright (c) 2024 Jonathan Sakkos
81
-
82
- Permission is hereby granted, free of charge, to any person obtaining a copy
83
- of this software and associated documentation files (the "Software"), to deal
84
- in the Software without restriction, including without limitation the rights
85
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
86
- copies of the Software, and to permit persons to whom the Software is
87
- furnished to do so, subject to the following conditions:
88
-
89
- The above copyright notice and this permission notice shall be included in all
90
- copies or substantial portions of the Software.
91
-
92
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
93
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
94
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
95
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
96
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
97
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
98
- SOFTWARE.
99
-
100
- Acknowledgments
101
- ===============
102
-
103
- This product uses the TMDB API but is not endorsed or certified by TMDB.
104
-
105
- .. image:: https://www.themoviedb.org/assets/2/v4/logos/v2/blue_long_2-9665a76b1ae401a510ec1e0ca40ddcb3b0cfe45f1d51b77a308fea0845885648.svg
106
- :alt: The Movie Database
107
- :target: https://www.themoviedb.org/
108
-
109
- .. |docs| image:: https://readthedocs.org/projects/mkv-episode-matcher/badge/?version=latest
110
- :target: https://mkv-episode-matcher.readthedocs.io/en/latest/?badge=latest
111
- :alt: Documentation Status
112
- .. |pypi| image:: https://badge.fury.io/py/mkv-episode-matcher.svg
113
- :target: https://badge.fury.io/py/mkv-episode-matcher
@@ -1,26 +0,0 @@
1
- mkv_episode_matcher/.gitattributes,sha256=Gh2-F2vCM7SZ01pX23UT8pQcmauXWfF3gwyRSb6ZAFs,66
2
- mkv_episode_matcher/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
- mkv_episode_matcher/__main__.py,sha256=lDMYl6SOH9fV_X7fPvMeIXEzT-jAaDg90FbqRUZyUb4,6772
4
- mkv_episode_matcher/config.py,sha256=zDDKBcsDt5fME9BRqiTi7yWKeast1pZh36BNYMvIBYM,2419
5
- mkv_episode_matcher/episode_matcher.py,sha256=HJQ6ucGtHbFQqG27GohDJjd4-pDZyqPig-x5SRju0Q8,9536
6
- mkv_episode_matcher/mkv_to_srt.py,sha256=m34nhgiBSBGpymePUt2C-EmGhcjoXnv3S0SLod-DkFo,6092
7
- mkv_episode_matcher/old_requirements.txt,sha256=76Vnmjv4R08bmjbaAu8Kbl0ogyT7MBdVPprBegxc4Uk,76
8
- mkv_episode_matcher/tmdb_client.py,sha256=LbMCgjmp7sCbrQo_CDlpcnryKPz5S7inE24YY9Pyjk4,4172
9
- mkv_episode_matcher/utils.py,sha256=Jc0_sn_UG-n_sQ-oLQqMhFuU2QmNiU1iNb8sfd8ljEw,9439
10
- mkv_episode_matcher/libraries/pgs2srt/.gitignore,sha256=mt3uxWYZaFurMw_yGE258gWhtGKPVR7e3Ll4ALJpyj4,23
11
- mkv_episode_matcher/libraries/pgs2srt/README.md,sha256=olb25G17tj0kxPgp_LcH5I2QWXjgP1m8JFyjYRGz4UU,1374
12
- mkv_episode_matcher/libraries/pgs2srt/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- mkv_episode_matcher/libraries/pgs2srt/imagemaker.py,sha256=w5YMWU70TPf7bjbVUcXBIagBMR4mz0uXqHdjLO1GQlY,2733
14
- mkv_episode_matcher/libraries/pgs2srt/pgs2srt.py,sha256=miKviiKRlN7h2tkbV-3twyjUzVnXWbWZPYEaLy-wKdo,4162
15
- mkv_episode_matcher/libraries/pgs2srt/pgsreader.py,sha256=bFlaPYzUs9H9qZ5JEE53YmP08yma2c59aLQBNzAgz_c,6948
16
- mkv_episode_matcher/libraries/pgs2srt/requirements.txt,sha256=sg87dqWw_qpbwciw-Mc5mRJnV9LaCni2cybnT5ANqnA,59
17
- mkv_episode_matcher/libraries/pgs2srt/Libraries/SubZero/SubZero.py,sha256=1ZXUENOTxK4u9dBNTwnjrd-GRE-WHf-yi2LBainSwRw,9869
18
- mkv_episode_matcher/libraries/pgs2srt/Libraries/SubZero/post_processing.py,sha256=KZgMDCLPSfnDbbC9myvg1znkjapO0iSp7z_mIxf2e5k,9742
19
- mkv_episode_matcher/libraries/pgs2srt/Libraries/SubZero/dictionaries/data.py,sha256=GpbuAVy8IPX7KRqKUuhToJuUVqhASg_Phw_6j8KJN6g,676580
20
- mkv_episode_matcher/notebooks/get_subtitles_test.ipynb,sha256=7dku1ttsUB96R_7RVhSKAlbMfuJsOxkXAtFgJUwVqqc,8031
21
- mkv_episode_matcher/notebooks/whisper.ipynb,sha256=c2IoZxpuBca9oId4KQUAzcCCiv8OogSDGpFE6fdxSJ4,5880
22
- mkv_episode_matcher-0.1.12.dist-info/METADATA,sha256=LAH8MaSC-za_vcCd63PEgu5Dv9jCsEazmRcmvgRkzes,4841
23
- mkv_episode_matcher-0.1.12.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
24
- mkv_episode_matcher-0.1.12.dist-info/entry_points.txt,sha256=IglJ43SuCZq2eQ3shMFILCkmQASJHnDCI3ogohW2Hn4,64
25
- mkv_episode_matcher-0.1.12.dist-info/top_level.txt,sha256=XRLbd93HUaedeWLtkyTvQjFcE5QcBRYa3V-CfHrq-OI,20
26
- mkv_episode_matcher-0.1.12.dist-info/RECORD,,