textgridde-rs

Crates.iotextgridde-rs
lib.rstextgridde-rs
version0.1.1
sourcesrc
created_at2024-08-11 23:17:51.862286
updated_at2024-08-31 17:33:34.789516
descriptionA library for dealing with Praat TextGrid files. MIT licensed.
homepage
repositoryhttps://github.com/cmlong02/textgridde-rs
max_upload_size
id1333706
size88,703
Caleb Long (cmlong02)

documentation

README

= 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 :-)

Commit count: 0

cargo fmt