Skip to content

Latest commit

 

History

History
55 lines (32 loc) · 1.41 KB

README.md

File metadata and controls

55 lines (32 loc) · 1.41 KB

Ebu Stl Subtitle Writer

Purpose

Create subtitles in the stl format. Support colors, boldface, italics, underlining; in order to get formatted subtitles on youtube.

You may also be interested in this project, converting subtitles from stl to srt (SubRipText): Subtitle Converter

Usage

Requires the gem bindata.

$ gem install bindata

Write a simple subtitle file:

EbuStl::StlTools.new do
    subtitle 0,  10, 'Subtitle from 0s to 10s'
    subtitle 10, 20, '<color=red>Red color.</color>'
    output '/path/to/file'
end

More examples at the end of save_stream_stl.rb.

Writes a simple stl file.

$ ruby 'stltools.rb' > ./testfiles/writing_test.stl

Reads a file and pretty prints it in utf-8 to stdout.

$ ruby 'stltools.rb' < ./testfiles/writing_test.stl

If everything works out, you should see something like this:

cli output

License

MIT. Do whatever you want. I reccommend you start by fixing bugs. :w

Reference

Based upon: STL Reference

See here and here for more info on formatting with teletext codes used by the stl format.