abstract class Subtitles::Format

Overview

Each subtitle format (like ASS, SRT, JSON, etc.) should be compatible with this interface.

Direct Known Subclasses

Defined in:

format.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.detect #

detect this filetype


[View source]
def self.from_extension(extension string : String) : self.class? #

return the appropriate filetype for the given extension string.


[View source]

Instance Method Detail

abstract def content : IO #

The textual representation of the subtitles.


[View source]
abstract def to_captions #

Convert this Substation subtitles file to an intermediary format for conversion to another format. This process can be lossy, depending on the format.


[View source]