Simple code no longer works

Started by wout, April 13, 2018, 12:47:52 AM

Previous topic - Next topic

wout

Hello,

I used the code exiftool '-Title>Description' FILE to add a description based on the title field, and it worked on all my files last week. I'm copying IPTC data on JPEG files.

But now all descriptions have disappeared on the files and the code nog longer works - no description is added. So strange :-\

What could I be doing wrong? Maybe due to an OSX system update?

Thanks

Wout

Phil Harvey

Hi Wout,

What does this command give?:

exiftool -title FILE

If there is no title, then your copy command will do nothing.

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

wout

#2
Hey Phil,

It returns the title

Title                           : Golfer holding golf ball with glove

So very strange it does not copy :-\

When I make the command it gives me     1 image files updated

So it did something. And it worked before so that's the weirest part.

Alan Clifford

Quote from: wout on April 13, 2018, 12:47:52 AM
Hello,

I used the code exiftool '-Title>Description' FILE to add a description based on the title field, and it worked on all my files last week. I'm copying IPTC data on JPEG files.

Wout

That command worked for me using a jpg from a Fuji X-S1 camera on Macos High Sierra.  However, in my photo, both Title and Description are XMP rather than IPTC.

Could you post before and after versions of your photo.



Phil Harvey

I think I need more details now.  Does ExifTool say the file is updated?  Can you read back the Description with ExifTool?  What exactly do you mean by "no longer works"?

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

wout

Hey Phil,

Thanks for the insights!

I ran exiftool -description FILE and they are all there... so exiftool did it's job.

But... OSX finder does not show the description in the finder. And it DID two weeks ago.

I found an article saying this:

QuoteWhile the Finder information window will show you these details, this may only be a subset of the metadata that a file contains. To see these details in-depth, you will need to use the Terminal's "mdls" command, which will list all the metadata tags and values bound to a specific file.
Source: https://www.macissues.com/2014/05/12/how-to-look-up-file-metadata-in-os-x/

I can live with that (although it's stupid) - the most confusing part is where the finder showed me the description before, and now it does not anymore.

So I will just need to use exiftool now to check it the description was copied instead of reading it directly in the finder.

Also, the mdls FILE command in the terminal, gives me a lot of extra info, but the description is NOT there, while it is there when I ask it in exiftool.

I'm disappointed in apple here - but I can trust exiftool to check the description - very happy about that!

Phil Harvey

I thought that may be the problem.

BTW, ExifTool will return the results of mdls with this command:

exiftool "-mditem*" FILE

There are a few different ways to get ExifTool to show the mdls tags, and this is one of them.  See the MacOS tags documentation for details.

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

Alan Clifford

Try this

exiftool '-Title>mwg:Description' x-s1_3579_2.jpg

I think with your original command line, you were creating xmp:description and Spotlight was not creating "MDItemDescription" from that.

I now see the description in finder which will be mditemdescription in exiftool;

cellini:temp alan$ exiftool -a -G -s  -iptc:objectname -xmp:title -xmp:description -mditemtitle -mditemdescription x-s1_3579_2.jpg

[IPTC]          ObjectName                      : Danger Point Lighthouse
[XMP]           Title                           : Danger Point Lighthouse
[XMP]           Description                     : Danger Point Lighthouse
[File]          MDItemTitle                     : Danger Point Lighthouse
[File]          MDItemDescription               : Danger Point Lighthouse



Alan Clifford

Spotlight must be creating its description from one of these: 

cellini:temp alan$ exiftool -G -exif:imagedescription -iptc:caption-abstract x-s1_3579_2.jpg
[EXIF]          Image Description               : Danger Point Lighthouse
[IPTC]          Caption-Abstract                : Danger Point Lighthouse



wout

Alan,

Thanks so much for reading up!

exiftool '-Title>mwg:Description' is the solution indeed! Now the finder shows the data again.

Problem solved - thanks both :D