fsub/README.md

38 lines
1.2 KiB
Markdown
Raw Normal View History

2021-08-29 09:48:54 -04:00
# fsub
2021-11-14 13:49:35 -05:00
`fsub` is a Python script for cleaning, editing and fixing a SubRip (.srt) file
2021-08-29 09:48:54 -04:00
2021-11-14 16:06:21 -05:00
# Installation
Through Python's pip:
```
pip install fsub
```
2021-08-29 09:48:54 -04:00
# Usage
2021-11-14 13:49:35 -05:00
```
2021-11-14 14:11:05 -05:00
usage: fsub [-h] [-c] [-s MS] [-n] [-f FILE] file [file ...]
2021-11-14 13:49:35 -05:00
Fix, edit and clean SubRip (.srt) files.
positional arguments:
2021-11-14 14:11:05 -05:00
file list of input files (they all must be SubRip files)
2021-11-14 13:49:35 -05:00
optional arguments:
2021-11-14 14:11:05 -05:00
-h, --help show this help message and exit
2021-11-14 16:37:24 -05:00
-c, --clean remove subtitles matching regular expressions listed in
2021-11-14 14:11:05 -05:00
~/.config/fsubrc (this is the default behavior if no other flag is
passed)
2021-11-14 16:37:24 -05:00
-s MS, --shift MS shift all subtitles by MS milliseconds, which may be positive or
2021-11-14 14:11:05 -05:00
negative
2021-11-14 16:37:24 -05:00
-n, --no-html strip HTML tags from subtitles content
2021-11-14 14:11:05 -05:00
-f FILE, --config-file FILE
2021-11-14 16:37:24 -05:00
overwrite the default config file (~/.config/fsubrc)
2021-11-14 13:49:35 -05:00
```
2021-08-29 09:48:54 -04:00
# Features
- Fixes subtitle numbering
2021-11-14 13:49:35 -05:00
- Converts files to UTF-8 encoding
- Validates file structure
2021-11-14 14:11:05 -05:00
- May remove subtitles containing lines that match any regular expression listed in the config file (by default `~/.config/fsubrc`)
2021-11-14 13:49:35 -05:00
- May shift the time of all subtitles
- May strip HTML