This is an experimental tool to help language-learners exploit parallel subtitles in various ways.
It's written using Rust, a programming language that's still under heavy development. So it may be hard to get this working on any given day. But if the following badge is green, there's a good chance everything will work:
substudy
You'll need to install Rust and Cargo:
sh
curl https://static.rust-lang.org/rustup.sh | sudo bash
Next, you'll need to clone and build substudy
:
sh
git clone https://github.com/emk/substudy.git
cd substudy
cargo build
If this fails with the latest Rust, please feel free to submit an issue.
If you have multirust
installed, you can use the new cargo
install
feature to install this program on your system:
rust
multirust run nightly cargo install substudy
substudy
To get a list of supported commands, run target/substudy --help
:
``` Subtitle processing tools for students of foreign languages
Usage: substudy clean
For now, all subtitles must be in *.srt format. Many common encodings will be automatically detected, but try converting to UTF-8 if you have problems. ```
So, for example, you could run:
sh
target/substudy combine foreign.srt native.srt > bilingual.srt
The simplest tool for extracting subtitles from DVDs is Handbrake. If you can't find what you need on the DVD, another good source of subtitles is opensubtitles.org. To OCR, convert, realign and otherwise clean up subtitles, the open source Windows application Subtitle Edit is an excellent choice, and it runs fine in a Windows VM.
My favorite tools are VLC, for watching on my computer, and Videostream, for streaming videos to my TV using a Chromecast. The same subtitle file should work fine with both.
You can find API documentation on the Rust CI site. Note that
all APIs are experimental and subject to change. If you want to use
substudy
as a library in your own tools, you're encouraged to do so, but
it might be worth letting me know which APIs you're using so that I can
stabilize them.
Please feel welcome to send me a pull request or submit an issue!
Things which I'd love to see subs2srs
support include:
*.srt
files.Things which I'll probably merge if they come with clean code and solid test suites:
*.srt
.This program is released into the public domain using the Unlicense. Our test suites contain a half-dozen lines of subtitles from copyrighted TV shows, which should presumably fall under de minimis, fair use or equivalent exceptions in most jurisdictions.