On 2022-09-26 at 19:16, David Wright wrote: > On Mon 26 Sep 2022 at 21:31:55 (+0200), Emanuel Berg wrote: > >> Greg Wooledge wrote:
>>> The entire thread was a result of your assumption that exif would >>> NOT write the words "Wrote file" if the input file had no exif >>> tag in it. This turned out to be false. exif writes those words >>> every time. >> >> IMO it shouldn't write anything if nothing happens and in >> particular it shouldn't take time, which it does. Every time. > > I won't ask why you feel the need to keep running with --remove over > and over. > >> OK, how should it be done? No computing the second time the >> metadata is removed? > > Why oh why "second time"? It's not as if you're removing individual > tags in turn, and using the intermediate versions of the images for > some purpose. I just don't understand the point of this exercise. My guess is: there's a collection of image files which (occasionally?) gets added to, he wants to clean up this data from the files in that collection that have it, and he doesn't want to have to keep track of which ones have and have not already been cleaned up in this way. (Note: The rest is all speculative extrapolation from that starting point, and does not necessarily reflect what he actually thinks, *especially* if that starting point is not valid.) Thus, he wants to run with '--remove' on every file unconditionally, and have that Do The Right Thing (including not writing out the file when there's no need to do so) in every case. Since exif doesn't have that behavior, the answer is probably to do the detection separately from the remove command; I imagine there's probably a way to make exif tell you whether a given file has that data or not, and you could then use that output as input to an if statement to decide whether or not to run with '--remove'. But he seems to feel that it's unreasonable to need to do that, because it would involve having to run each file that *does* need it through exif twice in a row rather than just once, and in principle it would be possible for exif to do the detection internally and avoid the need for this external logic. -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw
signature.asc
Description: OpenPGP digital signature