https://github.com/hasauino/fixsrt
A python script to fix srt file exported from sonix ai with double lines encoded with a special string
https://github.com/hasauino/fixsrt
Last synced: about 2 months ago
JSON representation
A python script to fix srt file exported from sonix ai with double lines encoded with a special string
- Host: GitHub
- URL: https://github.com/hasauino/fixsrt
- Owner: hasauino
- License: mit
- Created: 2020-01-16T23:10:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-16T23:39:46.000Z (over 5 years ago)
- Last Synced: 2025-01-21T19:35:19.920Z (3 months ago)
- Language: Python
- Size: 12.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fixsrt
A python script to fix srt file exported from sonix ai with double lines encoded with a special stringInput file:
```
1
00:00:01,640 --> 00:00:02,720
السلام عليكم ورحمة الله2
00:00:02,750 --> 00:00:03,810
حيّاكم الله يا كرام3
00:00:03,830 --> 00:00:06,350
سامحوني على التأخر لظرف طارئ4
00:00:07,370 --> 00:00:11,000
كما تعلمون إخواننا وأحبابنا بدانا معكم###5
00:00:11,000 --> 00:00:14,540
قبل أكثر من سنتين مشوار سلسلة رحلة اليقين```
output file:
```00:00:01,640 --> 00:00:02,720
السلام عليكم ورحمة الله2
00:00:02,750 --> 00:00:03,810
حيّاكم الله يا كرام3
00:00:03,830 --> 00:00:06,350
سامحوني على التأخر لظرف طارئ4
00:00:07,370 --> 00:00:14,540
كما تعلمون إخواننا وأحبابنا بدانا معكم
قبل أكثر من سنتين مشوار سلسلة رحلة اليقين```
# Install```
pip install -i https://test.pypi.org/simple/ pyfixsrt
```# Usage
- Basic:
```
fixsrt.py file.srt
```
- Change output file name, default "output":```
fixsrt.py file.srt --output file_out
```- Chnage line end flag characters, default "###":
```
fixsrt.py file.srt --eol "****"
```