Currently a work in progress but it should be able to produce usable .srt,.vtt and .ssa/ass files from one another.
```rust use rsubslib::srt; use rsubslib::vtt; use rsubs_lib::ssa;
fn main() { srt::parse("./tests/fixtures/test.srt".tostring()) // Can read either a file or a string .tovtt() // converts file to WEBVTT .tofile("./tests/fixtures/test.vtt".tostring()) // Writes the converted subtitle to a file .unwrap(); vtt::parse("./tests/fixtures/test.vtt".tostring()) .toass() // converts file to SSA/ASS .tofile("./tests/fixtures/test.ass".tostring()) .unwrap(); ssa::parse("./tests/fixtures/test.ass".tostring()) .tosrt() // converts file to SRT .tofile("./tests/fixtures/test1.srt".to_string()) .unwrap(); } ```
More examples are provided in the examples
folder.