2 releases
0.1.1 | Aug 31, 2024 |
---|---|
0.1.0 | Aug 11, 2024 |
#1041 in Parser implementations
67 downloads per month
86KB
2K
SLoC
textgridde-rs
Written by Caleb Long cmlong02@outlook.com
A Rust library for dealing with Praat TextGrid files.
Usage
use textgridde_rs::TextGrid;
fn main() {
let textgrid = TextGrid::from(PathBuf("path/to/textgrid.TextGrid")).unwrap();
for tier in textgrid.get_tiers() {
println!("Tier name: {}", tier.name());
match tier {
Tier::IntervalTier(interval_tier) => {
for interval in interval_tier.get_intervals() {
println!("Interval: {:?}", interval);
}
},
Tier::PointTier(point_tier) => {
for point in point_tier.get_points() {
println!("Point: {:?}", point);
}
}
}
}
}
License
MIT! Credit me if you can and it's feasible. Not necessary though :-)
Dependencies
~2.4–4MB
~70K SLoC