Lua: Lightroom plugin using exiftool for exif translations (faces, rating ...)

Started by flingo, October 15, 2015, 09:41:04 AM

Previous topic - Next topic

flingo

Hi folks,
I recently added some Exif translation features to the Lightroom PhotoStation Upload plugin (a Lightroom Export/Publish provider for Synology NAS / PhotoStation). I used exiftool in stay_open mode and I was really impressed by the flexibility of exiftool and the speed of the stray_open mode. There is almost no difference in speed whether or not the exiftool processing is turned on or off!

Thanks to Phil for this cool tool!

The plugin (and code) is freely available on GitHub:
https://github.com/flingo64/PhotoStation-Upload-Lr-Plugin
The code dealing with exiftool can be found in
https://github.com/flingo64/PhotoStation-Upload-Lr-Plugin/blob/master/PhotoStation_upload.lrplugin/PSExiftoolAPI.lua

My API design is probably not the best, but I think it's good enough to understand how to to launch/kill the exiftool and to communicate with it via command and response files in a Lr plugin environment. Currently, it only translates Lr/Picasa detected faces regions and star ratings into the related tags required by the PhotoStation, but adding more translations should be easy.

Greetings,

Martin

Phil Harvey

Hi Martin,

Thanks for this post.

I've added a link to your Plug-in from the ExifTool home page.

- 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 ($).

flingo

Hi Phil,
thanks for the accolade!  ;)

I really appreciate your work! I game across your tool may be one year ago when I was looking for (and found) a script to integrate tags in .modd files (generated by Sony's Photo Software) back into the jpg files. That script was so helpful and the starting point for the migration of my photo archive to a hopefully more future-proof solution!

Now it's time to give back something.

:)
Martin

flingo

Hi Phil,

I just realized that my way of translating Picasa/Lr face regions to PhotoStation/WLPG face regions has a flaw: if you process a photo with 2 face regions, but only 1 name (the other region being unnamed), the name will always be assigned to the first region in the WLPG photo, yielding a fair 50% chance of being correct ...

I now also realized that you already implemented a config file for this translation:
https://exiftool.org/forum/index.php/topic,4361.0.html
https://exiftool.org/forum/index.php?action=dlattach;topic=4361.0;attach=462
and it turns out that your config file work well in this situation.

So, I guess I have to learn the config file thing ...
Thanks again!

Martin

flingo

I rewrote the whole module to use a config file for the face region and ratings translations.

All roads lead to Rome, but this is definitely the highway via Tuscany in a Porsche 911!

Powerful, very elegant, less to code in Lua and probably the fastest way to do it.

:) Martin