While the EXIF crate is pretty good when it comes to parse JPEG and
PNG metadata, it does not support non-exif metadata such as MOV
I'd like to organise my videos like my pictures. I did not find a
Rust-native swiss army knife library. So I sadly decided to shell out
metadata parsing to the exiftool program if the exif crate does not
manage to parse the picture metadata.
Despite its name, this program can parse a wide range of picture/video
shooting metadata outside of EXIF. That's really good.
If for some reason exiftool fails to parse the file creation time, we
fallback to the unix file datetime.
Concurently backing up the files pointed by stdin. Instead of having
to spin up a whole picobak process for each and every picture we want
to back up, we create a single process in charge of backing up the
files using all cores. This massively improves the backup speed.
We use rayon to concurently process the pictures.
We adopt a semi-naive approach. Probably not the best performing and
most robust solution, but at least we have something functional.
We rely on a external scheduler, such as GNU parallel, to concurently
copy the files and use as much cores as possible. It makes the program
composable with the GNU userspace toolchain.
It however comes at a cost: we have to spin-up/tear-down a process for
each file. Scheduling the copy from inside the Rust program by
creating multiple threads (using rayon?) would be likely much more
performant. We'll probably come to it in the future.
The error handling also left to be desired. We're panicking with a
error message every time we encounter something unexpected.
The program is also untested. Might eat your kitten for now.