memedb_core 2.0.1

Rust library for reading and writing tags to different media formats
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Reads the file paths provided as args and prints the tags they contain, if any
// `cargo run --example reader -- meme.ext`
fn main() {
    for path in std::env::args().skip(1) {
        let file = std::fs::File::open(&path).unwrap();
        match memedb_core::read_tags(&mut std::io::BufReader::new(file)) {
            Ok(tags) => match tags {
                Some(tags) => println!("{}: {:?}", path, tags),
                None => println!("{}: unknown format", path),
            },
            Err(e) => eprintln!("{}: {}", path, e),
        }
    }
}