this post was submitted on 17 Aug 2024
7 points (88.9% liked)

Apple

4949 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.

top 7 comments
sorted by: hot top controversial new old
[–] WhatAmLemmy@lemmy.world 1 points 3 weeks ago (1 children)

Don't think you need exiftool at all. You should be able to do it entirely in a shortcut.

https://thenextweb.com/news/how-to-remove-metadata-from-your-photos-on-ios

[–] Jimmycrackcrack@lemmy.ml 1 points 3 weeks ago (1 children)

I don't have an iPhone, though I understand the shortcuts of Mac os are supposed to be compatible with iOS so maybe there's a possibility the instructions could work on my Mac. I don't want to convert the images though just strip that metadata.

The other thing is, I kind of want to do it this way because there's something of an ulterior motive here where I want to learn to make simple applications and buttons that work with various command line apps I use frequently on my computer, like a crude form of home made GUI. I find that there are often such apps where I only use one or two commands and use just often enough to need an easier way but infrequently enough not to remember the syntax of what to type.

[–] 2xsaiko@discuss.tchncs.de 1 points 3 weeks 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 weeks 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

[–] SendMePhotos@lemmy.world 0 points 3 weeks ago (1 children)

I thought back in the day, Metadata couldn't be modified which is what led a lot of things to be evidence in courts. Like, timestamps of photos and geo data

[–] Jimmycrackcrack@lemmy.ml 5 points 3 weeks ago (1 children)

no it's very easy to modify. I just wanted not to have to open up terminal and try and remember what the commands were every time I upload something to the internet

[–] SendMePhotos@lemmy.world 1 points 3 weeks ago

Neat. My knowledge is based on data from a long time ago since I haven't really messed with stuff for a while. Got caught up in life and all.