2 unstable releases
Uses new Rust 2024
0.2.0 | May 20, 2025 |
---|---|
0.1.0 | May 9, 2025 |
#1102 in Parser implementations
1MB
618 lines
srt-linter
💬🔍
💬🔍 srt-linter
is a CLI tool to inspect and detect issues inside SubRip Text (.srt
) files.
ToC
Installation 📥
Install srt-linter
with cargo
:
$ cargo install srt-linter
If you don't have cargo
or don't want to build srt-linter
yourself, you can get the latest pre-built binary from here.
Usage ⌨️
srt-linter
has a very simple interface:
$ srt-linter --help
Look for issues inside SubRip text (.srt) files.
Usage: srt-linter [OPTIONS] <FILE_PATH>
Arguments:
<FILE_PATH>
Options:
-v, --verbose Logs additional information about internal actions
-s, --strict Enforces stricter rules for suspicious behavior
-t, --tui Shows a TUI at the end
-h, --help Print help
-V, --version Print version
Consider this:
$ srt-linter -s -v ./the.sopranos.s6.ep4.srt
[INFO] Detected BOM.
[SUCCESS] File is semantically OK.
[SUCCESS] File is structurally OK. Read 1565 line(s).
srt-linter
is saying the following things:
- It detected the byte-order mark (
U+FEFF
) character on the file. (-v/--verbose
) - It successfully went through the file and ensured each line is accurate as per the SubRip Text format.
- It successfully parsed the file, ensuring structural soundness and read 1565 lines of subtitle text.
srt-linter
says this file is valid. Let's load it up on a media player and see if srt-linter
is right.
I'm using mpv
and there you go:

A similar interface is available in srt-linter
, just pass in the -t/--tui
flag:

Wishlist 💭
- Implement a TUI to visualize the subtitles.
- Implement
.srt
format's unofficial markup extension.
Contributing 🤝
Hey, thanks! If you've found a bug or something that works unexpectedly, feel free to open an issue.
If you're a programmer and are interested in fixing it yourself, take a look at CONTRIBUTING.md. I really appreciate your help!
Acknowledgements ✨
Thanks to @hitblast for helping me test srt-linter
.
License ⚖️
This project is licensed under the MIT license.
Dependencies
~8–18MB
~252K SLoC