this post was submitted on 17 Aug 2024
9 points (90.9% liked)

Apple

4982 readers
1 users here now

Here you can talk about Apple's ecosystem, Apple's OSs (Operating Systems), Apple's apps, Apple's everything!!

founded 4 years ago
MODERATORS
 

I have been trying in vain to do this in both automator and shortcuts.

The trouble seems to be happening right at the very start. I can't seem to figure out how to get selected files from finder to be passed as input to a shell script running exiftool.

I actually thought this might be a good thing for me to test using chatGPT for as it's meant to be good at this type of thing and while I assume the shell scripts it was generating were probably good, it couldn't seem to get me passed this basic first step.

I've tried making the shortcut a quick action, which by default adds the 'receive' action to the shortcut, but somehow it seems to be impossible to get the output from that to be the input for the shell script, nothing works. This was tested with a few debugging steps to log the output and it definitely looks like that first step is where things are going wrong. I really don't get it. This was way harder than I expected.

you are viewing a single comment's thread
view the rest of the comments
[–] 2xsaiko@discuss.tchncs.de 1 points 3 months ago (1 children)

I don’t want to convert the images though just strip that metadata.

FWIW the Convert Image action can be set to "Preserve Input" and still has a checkbox to clear metadata.

However I think image format handling is bugged, at least on iOS when importing from Photos, since I used it recently and it converted screenshots (which are PNG) to JPEG when used in my shortcut, even with "Preserve Input", and I had to explicitly convert to PNG to keep the format, so I don't know how much that will actually do for you.

There is also a Run Shell Script action in Shortcuts on macOS which should help you if you want to do it with exiftool.

[–] 2xsaiko@discuss.tchncs.de 1 points 3 months ago

Here's a small example shortcut that opens a file dialog and uses it in a shell script: https://www.icloud.com/shortcuts/a1d29c165ba14b7a910de0a603443b3a