[][src]Crate srtparse

A library for reading SRT Subtitles.

Examples

Reading from a string

let items = srtparse::from_str("1\n00:00:01,100 --> 00:00:02,120\nHello!").unwrap();
println!("{:?}", items);

Reading from a file

let items = srtparse::from_file("./data/underworld.srt").unwrap();
println!("{:?}", items[0]);

Structs

Item

A subtitle item

Time

Describes the time when subtitle should appear or disappear

Enums

ItemFactoryError

Could not create subtitle

ParseError

An error when parsing a subtitle

ParseTimeError

An error when parsing time

ReaderError

An error when reading subtitles

Functions

from_file

Read subtitles from a file

from_reader

Read subtitles from a buffered reader

from_str

Read subtitles from a string