11 releases (4 breaking)
0.4.0 | Dec 30, 2019 |
---|---|
0.3.1 | Sep 9, 2019 |
0.3.0 | Aug 15, 2019 |
0.2.4 | Jul 14, 2019 |
0.0.0 | Feb 20, 2019 |
#2568 in Parser implementations
37 downloads per month
Used in 2 crates
(via ssb_renderer)
88KB
2K
SLoC
ssb_parser
1st level component of ssb_implementation.
lib.rs
:
Parser component of subtitle format implementation.
// Imports
use std::{
convert::TryFrom,
fs::File,
io::{BufReader,Cursor}
};
use ssb_parser::{Ssb,SsbRender};
// Data
let ssb_reader1 = Cursor::new("...");
let ssb_reader2 = BufReader::new(File::open("/foo/bar.ssb").unwrap());
// Parsing
let ssb = Ssb::default()
.parse_owned(ssb_reader1).unwrap()
.parse_owned(ssb_reader2).unwrap();
let ssb_render = SsbRender::try_from(ssb).unwrap();
// Print
println!("{:#?}", ssb_render);
Dependencies
~2.5MB
~60K SLoC