Export selected fields of IPTC on a Mac

Started by pauld2023, January 13, 2023, 05:41:57 PM

Previous topic - Next topic

pauld2023

I found this thread about... "Export selected fields of IPTC metadata from Adobe Bridge" and copying a command that Phil posted.  I'm trying to make it work on a Macintosh and as a super newbie but I'm not sure how to start the path in a Macintosh directory substituting for the G drive in this example.

The best I could do returned these lines...
exiftool -csv -creator -headline -description -city -keywords -jobidentifier -instructions -source -imageheight -imagewidth Macintosh HD:\Users/paul/Documents/Peter_ID_PEOPLE
Error: File not found - Macintosh
Error: File not found - HD:Users/paul/Documents/Peter_ID_PEOPLE
SourceFile
    0 image files read
    2 files could not be read
Pauls-MBP-2:~ paul$ 

ExifTool-12.54 is the version I'm working with, macOS 10.14.6 and the image files in question JPEGs that I used Bridge 2021 to add the IPTC metadata.

Thanks in advance for any help.

Paul

Phil Harvey

Hi Paul,

You don't have to type the file and/or folder path -- just drag and drop the file/folder on the Terminal window and it will type in the full path for you.

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

Hubert

#2
FWIW if for any reason you do need to type the full path, you must escape any spaces, either by enclosing the full path in single quotes or using backslashes.

For example

exiftool '/Users/paul/Documents/Latest pictures'
or

exiftool /Users/paul/Documents/Latest\ pictures
The path can start at /Users/ - no need for anything above that.

But drag-and-drop is definitely the easiest way.

pauld2023

Thanks Phil (& Hubert),

I's been taught the dragging technique but forgot it. I'm running some tests and was able to export 'creator' and 'description' but there will be other fields that are part of IPTC Core that I want to use including one that's not appearing in the export which is sublocation.

exiftool -csv -creator -description -sublocation

Given that almost all the photographs in the collection were taken in New York City I'm leaving 'city' blank and putting a place name or a street intersection in the sublocation field but even though you see it in the command it doesn't export. I'll probably be adding other fields but I'm wondering why this field doesn't export?

Thanks in advance for any help.

Paul

Hubert


pauld2023

Thanks Hubert, that worked. Is there a rule of thumb about adding the hyphen on a field name?

Thanks,

Paul

Hubert

No, I don't know why ExifTool adds a hyphen in the middle of that particular tag. The IPTC legacy tag is hyphen-free.

Phil Harvey

I avoid putting a hyphen in tag names now, but back when I added IPTC support I hadn't established this rule.  Here is the IPTC-NAA IIM v4.1 documentation that I was working from:

Screen Shot 2023-01-14 at 10.33.27 PM.png

When in doubt about tag names, check the ExifTool Tag Name documentation, or run exiftool -s on a file containing the information.

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

pauld2023

Thanks all, the confusion stems from the way Bridge presents it which is hyphen-less, don't know way.

StarGeek

Don't assume that the names Bridge or any other programs list are the actual names of the embedded tags.  They try to provide an easy interface for dealing with metadata and the names they use don't always match the actual tag names.  Often they are reading from multiple tags in different groups.

For example, in the case of "sublocation", Bridge will read from either the older IPTC:Sub-location tag or the more modern XMP:Location tag.

You want to use the command in FAQ #3 to figure out the actual locations where the data is being written.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

pauld2023

I'm trying to add a couple of more metadata fields to this export command and running into problems. I'm pretty sure these 6 fields would do it for me but as I add city state and date created I'm getting errors.


exiftool -csv -creator -description -sub-location -city -state   -date created

I've tried to call up the  IIMV4.2 spec and even found this suggestion by Phil to format the state command differently but it's still coming up as invalid. I'd really be grateful if someone can help me format these field names correctly.

Invalid TAG name: "LocationCreatedProvinceState
https://exiftool.org/forum/index.php?topic=8063.0

At the risk of topic bloat are there any illegal characters besides slashes in the folder name I drag into terminal?

Thanks in advance for any help.

Paul

p.s. from FAQ 3 tried this but NG
Invalid TAG name: "Province-State

Phil Harvey

Hi Paul,

If you are talking about IPTC IIM tags then it is ProvinceState (see the ExifTool IPTC Tag name documenation).

QuoteAt the risk of topic bloat are there any illegal characters besides slashes in the folder name I drag into terminal?

The slash is legal in Mac folder names, and correctly translates to a colon when dragged and dropped on Terminal.

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

pauld2023

Thanks Phil, that page says 95   Province-State   string[0,32]   

Yet when I enter it that way it seems to be invalid

paul$ exiftool -csv -creator -description -sub-location -Province-State/Users/paul/Documents/box
Invalid TAG name: "Province-State

Phil Harvey

You're looking at the specification but you should be looking at the ExifTool documentation that I linked.
...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 ($).

pauld2023

#14
Hi Phil, I've succeeded with the other fields...
exiftool -csv -creator -description -sub-location -city -DateCreated

sorry to be dense but for state but I referenced this exiftool page...
https://exiftool.org/TagNames/IPTC.html#ApplicationRecord

which says...    Province-State  string[0,32]   

Yet when I enter it that way it seems to be invalid

paul$ exiftool -csv -creator -description -sub-location -Province-State/Users/paul/Documents/box
Invalid TAG name: "Province-State