New and lost: could I exiftools with a text file of keyword start and stop times

Started by Telekinetic, March 21, 2022, 09:09:29 PM

Previous topic - Next topic

Telekinetic

I am a sports photographer trying to streamline my keywording by doing as much up front during the actual event as I can. To that end, I have made an Arduino-based gadget that will let me toggle keywords on and off or cycle through them with some rotary encoders, and store keyword start and stop times with time stamps to a text file.

I could have it store info in any format, but my current is something like:

08:03:04, Vault, ON
08:03:05, Athlete 1, ON
08:06:10, Athlete 1, OFF
08:06:10, Athlete 2, ON
etc etc
08:37:23, Vault, OFF
08:37:23, Bars, ON
08:37:35, Athlete 1, ON


My workflow thought is make sure my camera and gadget times are synchronized, adjust the currently active keywords on my gadget while I'm shooting, then afterwards copy the text file into the imported photos directory on my PC

I'd want to then run something to apply every active keyword to images taken between the "on" and "off" times--for example, an image timestamped 08:04:14 would have the keywords "vault" and "athlete 1" applied.

1.  Is there already established syntax for this kind of "mail merge" function?
2.  Is there another way others have achieved the same result?

Thanks for any pointers in the right direction!

Phil Harvey

This is very similar to the -geotag feature of ExifTool, but with keywords instead of GPS coordinates.

ExifTool won't do what you want directly, but it would be easy to create a simple Perl script calling the Image::ExifTool functions to do this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Telekinetic

Glad to hear it, I'll look at the geotag implementation for inspiration!

Thanks for doing the heavy lifting for me, I was very nervous at making something that reached out and touched my image files with my relatively amateur coding skills!  I'll start a thread once I have a working prototype in case it is of interest to others.

-Martin

Phil Harvey

Hi Martin,

The geotag implementation is far more complex than the simple script you will need.  I don't think it will help you at all.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).