exiftool-rs 0.8.0

Read, write, and edit metadata in 93 file formats — a pure Rust reimplementation of ExifTool 13.59 with tag-name and value parity across the test corpus
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use exiftool_rs::tags::conv_expr::{eval, Val};
fn main() {
    for e in [
        "$val =~ /^..([a-z0-9]{4})/i ? hex($1) : undef",
        "$val=~/(\\d+) (\\d+)/ ? \"$2.$1\" : \"0.$val\"",
        "(($val >> 13) & 0x7) . \" \" . (($val >> 12) & 0x1)",
        "$val m",
        "$_=join(\".\", unpack(\"C*\", $val))); s/(:.*?:.*?:.*?):/$1 /; $_",
        "Get8u(\\$val,0) . \": \" . substr($val, 1)",
    ] {
        println!("{:?} -> {:?}", e, eval(e, &Val::Str("ab12345".into())));
    }
}