OSX Automator Workflow and showing ExifTool progress

Started by gspannu, September 13, 2019, 05:58:59 AM

Previous topic - Next topic

gspannu

Using macOS: I use an OSX automator workflow as it is easy to then set it as a service that can be accessed by right-clicking on a folder/selected files.

I have an automator workflow that
- Workflow receives current [files and folders] in [Finder]
- then passes this as input to a [Run Shell Script]
/usr/local/bin/exiftool -tagsfromfile %d%f.XMP -XMP:Country -XMP:State -XMP:City -XMP:Location '-XMP:Description<${Location}, ${City}, ${Country}' -overwrite_original -ext CR2 -ext HEIC -ext TIFF "$@"

I am looking to add a progress bar dialog that can show progress; as I do tend to process a lot of files. I have tried to read the documentation and forum posts, but can't figure it out.

The workflow (as a zip) is attached as well for reference.

Would much appreciate if someone can amend the attached workflow and repost or suggest code in the Run ShellScript section.



Hayo Baan

You won't be able to do this directly. First of all there is (at least not to my knowledge) no way to display a progress bar from an Automator action, and even if there was one, there won't be a way to tell exiftool to interact with it.

Instead, I propose the following work-around: create a shell script with the full exiftool command with the -progress option (for additional options to -progress, see manual) and make it executable. You can drop files/folders on top of this. Which will then open a terminal window executing the command, showing the progress as well (it will close when done, unless of course you have the script wait for user input or whatever).

There are likely other, more complex, methods (e.g. using applescript to open a terminal window etc.), but above is what will work and is easily done.
Hayo Baan – Photography
Web: www.hayobaan.nl