substudy 0.0.5

Tools for working with parallel, bilingual subtitles
docs.rs failed to build substudy-0.0.5
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: substudy-0.5.2

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:

Build Status

Building substudy

You'll need to install Rust and Cargo. Note that Rust is currently undergoing library stabilization before version 1.0, and things are changing on an almost nighly basis.

curl https://static.rust-lang.org/rustup.sh | sudo bash

Next, you'll need to clone and build substudy:

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.

Running substudy

To get a list of supported commands, run target/substudy --help:

Subtitle processing tools for students of foreign languages

Usage: substudy clean <subtitles>
       substudy combine <foreign-subtitles> <native-subtitles>
       substudy --help

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:

target/substudy combine foreign.srt native.srt > bilingual.srt

Finding & preparing subtitles

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.

Watching video with bilingual SRT subtitles

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.

Using substudy as a library

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.

Contributing

Please feel welcome to send me a pull request or submit an issue!

Things which I'd love to see subs2srs support include:

  • Working with clean *.srt files.
  • Creating various sorts of parallel media: subtitles, Anki cards, etc.

Things which I'll probably merge if they come with clean code and solid test suites:

  • Character set conversion.
  • Various sorts of subtitle cleanups.
  • Formats other than *.srt.

License

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.