|
1 | | -# Offline Sub Converter |
2 | | - |
3 | | -Offline Sub Converter allows you to change subtitle formats using the command shell. |
| 1 | +<h1 align="center">Offline Sub Converter</h1> |
| 2 | + |
| 3 | +<p align="center">The CLI script made with Python for easy conversion of subtitles files</p> |
| 4 | + |
| 5 | +<p align="center"> |
| 6 | + <a style="text-decoration:none" href="https://github.com/TheFifthLeaf/offline-sub-converter/releases"> |
| 7 | + <img src="https://img.shields.io/github/v/release/TheFifthLeaf/offline-sub-converter?color=3C7DD9" alt="Releases"> |
| 8 | + </a> |
| 9 | + <a style="text-decoration:none" href="https://www.python.org/downloads/"> |
| 10 | + <img src="https://img.shields.io/badge/python-3.6%2B-3C7DD9" alt="Python Version"> |
| 11 | + </a> |
| 12 | + <a style="text-decoration:none" href="https://choosealicense.com/licenses/gpl-3.0/"> |
| 13 | + <img src="https://img.shields.io/badge/license-GPL%20V3-3C7DD9" alt="License GPLv3"> |
| 14 | + </a> |
| 15 | + <a href="https://www.codefactor.io/repository/github/thefifthleaf/offline-sub-converter"> |
| 16 | + <img src="https://img.shields.io/badge/codefactor-A%2B-3C7DD9" alt="CodeFactor" /> |
| 17 | + </a> |
| 18 | +</p> |
4 | 19 |
|
5 | 20 | ## Installation |
6 | 21 |
|
7 | | -This program uses an external module: |
| 22 | +You will need an external module to use the .py script |
8 | 23 | - chardet |
9 | 24 |
|
10 | | -You can install it with the command: |
| 25 | +You can install it throught the requirements file |
11 | 26 |
|
12 | 27 | ```bash |
13 | 28 | pip install -r requirements.txt |
14 | 29 | ``` |
15 | 30 |
|
16 | | -If the installation fails due to lack of access rights, try this: |
| 31 | +If the installation fails due to lack of access rights, try this |
17 | 32 |
|
18 | 33 | ```bash |
19 | 34 | pip install --user -r requirements.txt |
20 | 35 | ``` |
21 | 36 |
|
| 37 | +**However, feel free to use the portable .exe file, which does not require additional installations.** |
| 38 | + |
22 | 39 | ## Usage |
23 | 40 |
|
24 | | -To convert, type: |
| 41 | +To convert using .exe, please type: |
| 42 | + |
| 43 | +```bash |
| 44 | +sub_converter.exe "path" format |
| 45 | +``` |
| 46 | + |
| 47 | +And using .py, type: |
25 | 48 |
|
26 | 49 | ```bash |
27 | | -python sub_converter.py "path" format_to |
| 50 | +python sub_converter.py "path" format |
28 | 51 | ``` |
29 | 52 |
|
30 | | -path - Directory or single file to convert\ |
31 | | -format_to - Target format |
| 53 | +### Usage example |
| 54 | + |
| 55 | +This will convert the specified file to SubRip format |
| 56 | +```bash |
| 57 | +sub_converter.exe "D:\Video\Se7en.sub" srt |
| 58 | +``` |
| 59 | +This will convert all the subtitle files in the Video directory to MicroDVD format |
| 60 | +```bash |
| 61 | +sub_converter.exe "D:\Video" sub |
| 62 | +``` |
| 63 | +This will convert all the subtitle files in the current folder to MPlayer2 format |
| 64 | +```bash |
| 65 | +sub_converter.exe "." mpl |
| 66 | +``` |
| 67 | +This will display help information |
| 68 | +```bash |
| 69 | +sub_converter.exe -h |
| 70 | +``` |
32 | 71 |
|
33 | 72 | ## Supported formats |
34 | 73 |
|
35 | | -- SubRip (srt), .srt |
36 | | -- MicroDVD (sub), .sub |
37 | | -- MPlayer2 (mpl), .txt |
38 | | -- TMPlayer (tmp), .txt |
| 74 | +- as **srt** - SubRip (.srt) |
| 75 | +- as **sub** - MicroDVD (.sub) |
| 76 | +- as **mpl** - MPlayer2 (.txt) |
| 77 | +- as **tmp** - TMPlayer (.txt) |
39 | 78 |
|
40 | 79 | ## Contributing |
41 | 80 |
|
|
0 commit comments