Author Topic: Writting metadata to all images from a CSV file on Mac  (Read 24879 times)

tdiaz

  • Jr. Member
  • **
  • Posts: 13
Re: Writting metadata to all images from a CSV file on Mac
« Reply #15 on: December 21, 2011, 05:47:41 PM »
Getting delimiters qualifiers into the CSV files from Excel seems challenging.. especially for Mac. Had to use OpenOffice ..

OTOH, I'm only getting keywords to update. Headline, Title & Description are not making it into the file.

I did export one photo with a bunch of pre-populated bogus data to get the right stuff.  Do the fields need to be in any order?

Attached is a screen shot of both the spreadsheet and csv output
« Last Edit: December 21, 2011, 05:53:53 PM by tdiaz »

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 18415
    • ExifTool Home Page
Re: Writting metadata to all images from a CSV file on Mac
« Reply #16 on: December 21, 2011, 08:34:09 PM »
Why do you say the other tags are not making it into the file?  What software are you using to read them?  My guess is that this is FAQ number 3.

The order doesn't matter.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

tdiaz

  • Jr. Member
  • **
  • Posts: 13
Re: Writting metadata to all images from a CSV file on Mac
« Reply #17 on: December 21, 2011, 10:34:38 PM »
I pretty much did that - I used another tool, Aperture, to write some stuff. Then I extracted metadata from that photo with ExifTool and chose the fields I wanted to write back to, made my file, and wrote.

When I look with both Photo Mechanic, Aperture and even Finder Get Info- the information is not there at all. Just the keywords.  Finder's Get Info will show me all of those fields, so will Preview.app

Hmmm...   

tdiaz

  • Jr. Member
  • **
  • Posts: 13
Re: Writting metadata to all images from a CSV file on Mac
« Reply #18 on: December 22, 2011, 01:46:03 AM »
In Aperture - I entered data in the fields I'm interested in:

As they are titled in Aperture:
Caption
Keywords
Copyright Notice
Title
Headline
Image Location
Image City
State/Province
Image Country

In the file I exported, I found data in the following fields (duplicates on the same line)

Caption-Abstract & Description
Subject & Keywords
CopyrightNotice & Rights
ObjectName & Title
Headline
Province-State & State
Country-PrimaryLocationName & Country

In my CSV file I imported the fields Description, Title, Headline, City & Keywords and only Keywords worked.

Headline is the only one that has no duplicate- and it will export data from that field, that I placed there with Aperture. But it will not import data to that field.

I changed the field names to their counterpart duplicates - and did this:
Code: [Select]
ICBM:1999 0904 CAP Sq47 Carrier Tour tdiaz$ exiftool -csv+=stennis.csv -P -overwrite_original_in_place -r .
No SourceFile './DSCN4585 (1).jpg' in imported CSV database
(canonical path: '/Volumes/Event Horizon/Photo Library Import/CAP D13/1999 0904 CAP Sq47 Carrier Tour/DSCN4585 (1).jpg')
    1 directories scanned
    8 image files updated
...and got the identically same result. No data shows other than keywords.  (The image DSCN4585 is not in my CSV file, the other 7 are)

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 18415
    • ExifTool Home Page
Re: Writting metadata to all images from a CSV file on Mac
« Reply #19 on: December 22, 2011, 07:05:54 AM »
I have a couple of questions:

1) Did you verify using ExifTool that the information was written?

2) Did you read the last paragraph of FAQ number 3?

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

tdiaz

  • Jr. Member
  • **
  • Posts: 13
Re: Writting metadata to all images from a CSV file on Mac
« Reply #20 on: December 22, 2011, 02:28:18 PM »
On #1 - Yes, I see no such information. But.. if I look at the same

This one was done, using the above CSV example, that was derived with a -csv . >output.txt as the basis, by doing:
exiftool -csv+=stennis.csv -P -overwrite_original_in_place -r -use MWG .

...and the result is below:

Code: [Select]
ICBM:1999 0904 CAP Sq47 Carrier Tour tdiaz$ exiftool -a -G1 chowline.jpg
[ExifTool]      ExifTool Version Number         : 8.71
[System]        File Name                       : chowline.jpg
[System]        Directory                       : .
[System]        File Size                       : 242 kB
[System]        File Modification Date/Time     : 1999:09:04 11:52:02-07:00
[System]        File Permissions                : rw-r--r--
[File]          File Type                       : JPEG
[File]          MIME Type                       : image/jpeg
[File]          Exif Byte Order                 : Big-endian (Motorola, MM)
[File]          Current IPTC Digest             : 6cb77c4c944a8141128211694813108a
[File]          Image Width                     : 896
[File]          Image Height                    : 600
[File]          Encoding Process                : Baseline DCT, Huffman coding
[File]          Bits Per Sample                 : 8
[File]          Color Components                : 3
[File]          Y Cb Cr Sub Sampling            : YCbCr4:2:2 (2 1)
[IFD0]          Make                            : RICOH
[IFD0]          Camera Model Name               : RDC-5000
[IFD0]          Orientation                     : Horizontal (normal)
[IFD0]          X Resolution                    : 72
[IFD0]          Y Resolution                    : 72
[IFD0]          Resolution Unit                 : inches
[IFD0]          Y Cb Cr Positioning             : Co-sited
[IFD0]          Copyright                       : (C) by RDC-5000 User
[ExifIFD]       Exif Version                    : 0210
[ExifIFD]       Date/Time Original              : 1999:09:04 11:52:02
[ExifIFD]       Create Date                     : 1999:09:04 11:52:02
[ExifIFD]       Components Configuration        : Y, Cb, Cr, -
[ExifIFD]       Compressed Bits Per Pixel       : 4
[ExifIFD]       Shutter Speed Value             : 1/45
[ExifIFD]       Aperture Value                  : 2.9
[ExifIFD]       Brightness Value                : 6553.1
[ExifIFD]       Exposure Compensation           : 0
[ExifIFD]       Max Aperture Value              : 2.8
[ExifIFD]       Light Source                    : Unknown
[ExifIFD]       Flash                           : Fired
[ExifIFD]       Focal Length                    : 8.0 mm
[ExifIFD]       User Comment                    :
[ExifIFD]       Flashpix Version                : 0100
[ExifIFD]       Color Space                     : sRGB
[ExifIFD]       Exif Image Width                : 896
[ExifIFD]       Exif Image Height               : 600
[ExifIFD]       Related Sound File              :
[Ricoh]         Firmware Version                : 1.06
[Ricoh]         Red Gain                        : B3
[Ricoh]         Blue Gain                       : 50
[Ricoh]         Green Gain                      : 44
[InteropIFD]    Interoperability Index          : R98 - DCF basic file (sRGB)
[InteropIFD]    Interoperability Version        : 0100
[IFD1]          Compression                     : JPEG (old-style)
[IFD1]          X Resolution                    : 72
[IFD1]          Y Resolution                    : 72
[IFD1]          Resolution Unit                 : inches
[IFD1]          Thumbnail Offset                : 1073
[IFD1]          Thumbnail Length                : 5367
[IPTC]          Keywords                        : Stennis, aviation, cadet_activities, Stennis, aviation, cadet_activities, Stennis, aviation, cadet_activities, Stennis, aviation, cadet_activities
[IPTC]          Application Record Version      : 4
[Photoshop]     IPTC Digest                     : e91625ec0b6c68f7f6686904be13be9e
[XMP-x]         XMP Toolkit                     : Image::ExifTool 8.71
[XMP-dc]        Subject                         : Stennis, aviation, cadet_activities
[Composite]     Aperture                        : 2.9
[Composite]     Image Size                      : 896x600
[Composite]     Shutter Speed                   : 1/45
[Composite]     Thumbnail Image                 : (Binary data 5367 bytes, use -b option to extract)
[Composite]     Focal Length                    : 8.0 mm
ICBM:1999 0904 CAP Sq47 Carrier Tour tdiaz$

This one was done by entering the same data in Aperture and exporting it- and then viewing it here:  All the data shows.

Code: [Select]
ICBM:1999 0904 CAP Sq47 Carrier Tour tdiaz$ exiftool -a -G1 chowline1.jpg
[ExifTool]      ExifTool Version Number         : 8.71
[System]        File Name                       : chowline1.jpg
[System]        Directory                       : .
[System]        File Size                       : 213 kB
[System]        File Modification Date/Time     : 2011:12:22 11:20:30-08:00
[System]        File Permissions                : rw-r--r--
[File]          File Type                       : JPEG
[File]          MIME Type                       : image/jpeg
[File]          Current IPTC Digest             : 37a12b5fc037d9e722759de77094d085
[File]          Exif Byte Order                 : Big-endian (Motorola, MM)
[File]          Image Width                     : 1024
[File]          Image Height                    : 686
[File]          Encoding Process                : Baseline DCT, Huffman coding
[File]          Bits Per Sample                 : 8
[File]          Color Components                : 3
[File]          Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
[JFIF]          JFIF Version                    : 1.01
[JFIF]          Resolution Unit                 : inches
[JFIF]          X Resolution                    : 72
[JFIF]          Y Resolution                    : 72
[IPTC]          Coded Character Set             : UTF8
[IPTC]          Application Record Version      : 2
[IPTC]          Keywords                        : aviation, cadet_activities, Stennis
[IPTC]          Object Name                     : Lunch on the USS John C. Stennis
[IPTC]          Headline                        : USS John C. Stennis Tour 2000
[IPTC]          Caption-Abstract                : Unidentified cadets.
[Photoshop]     IPTC Digest                     : 37a12b5fc037d9e722759de77094d085
[ICC-header]    Profile CMM Type                : Lino
[ICC-header]    Profile Version                 : 2.1.0
[ICC-header]    Profile Class                   : Display Device Profile
[ICC-header]    Color Space Data                : RGB
[ICC-header]    Profile Connection Space        : XYZ
[ICC-header]    Profile Date Time               : 1998:02:09 06:49:00
[ICC-header]    Profile File Signature          : acsp
[ICC-header]    Primary Platform                : Microsoft Corporation
[ICC-header]    CMM Flags                       : Not Embedded, Independent
[ICC-header]    Device Manufacturer             : IEC
[ICC-header]    Device Model                    : sRGB
[ICC-header]    Device Attributes               : Reflective, Glossy, Positive, Color
[ICC-header]    Rendering Intent                : Perceptual
[ICC-header]    Connection Space Illuminant     : 0.9642 1 0.82491
[ICC-header]    Profile Creator                 : HP
[ICC-header]    Profile ID                      : 0
[ICC_Profile]   Profile Copyright               : Copyright (c) 1998 Hewlett-Packard Company
[ICC_Profile]   Profile Description             : sRGB IEC61966-2.1
[ICC_Profile]   Media White Point               : 0.95045 1 1.08905
[ICC_Profile]   Media Black Point               : 0 0 0
[ICC_Profile]   Red Matrix Column               : 0.43607 0.22249 0.01392
[ICC_Profile]   Green Matrix Column             : 0.38515 0.71687 0.09708
[ICC_Profile]   Blue Matrix Column              : 0.14307 0.06061 0.7141
[ICC_Profile]   Device Mfg Desc                 : IEC http://www.iec.ch
[ICC_Profile]   Device Model Desc               : IEC 61966-2.1 Default RGB colour space - sRGB
[ICC_Profile]   Viewing Cond Desc               : Reference Viewing Condition in IEC61966-2.1
[ICC_Profile]   Luminance                       : 76.03647 80 87.12462
[ICC_Profile]   Technology                      : Cathode Ray Tube Display
[ICC_Profile]   Red Tone Reproduction Curve     : (Binary data 2060 bytes, use -b option to extract)
[ICC_Profile]   Green Tone Reproduction Curve   : (Binary data 2060 bytes, use -b option to extract)
[ICC_Profile]   Blue Tone Reproduction Curve    : (Binary data 2060 bytes, use -b option to extract)
[ICC-view]      Viewing Cond Illuminant         : 19.6445 20.3718 16.8089
[ICC-view]      Viewing Cond Surround           : 3.92889 4.07439 3.36179
[ICC-view]      Viewing Cond Illuminant Type    : D50
[ICC-meas]      Measurement Observer            : CIE 1931
[ICC-meas]      Measurement Backing             : 0 0 0
[ICC-meas]      Measurement Geometry            : Unknown (0)
[ICC-meas]      Measurement Flare               : 0.999%
[ICC-meas]      Measurement Illuminant          : D65
[IFD0]          Make                            : RICOH
[IFD0]          Camera Model Name               : RDC-5000
[IFD0]          Orientation                     : Horizontal (normal)
[IFD0]          X Resolution                    : 72
[IFD0]          Y Resolution                    : 72
[IFD0]          Resolution Unit                 : inches
[IFD0]          Software                        : Aperture 3.2.2
[IFD0]          Modify Date                     : 1999:09:04 11:52:02
[IFD0]          Copyright                       : (C) by RDC-5000 User
[ExifIFD]       Exif Version                    : 0210
[ExifIFD]       Date/Time Original              : 1999:09:04 11:52:02
[ExifIFD]       Create Date                     : 1999:09:04 11:52:02
[ExifIFD]       Compressed Bits Per Pixel       : 4
[ExifIFD]       Shutter Speed Value             : 1/45
[ExifIFD]       Aperture Value                  : 2.9
[ExifIFD]       Brightness Value                : 6553.1
[ExifIFD]       Exposure Compensation           : 0
[ExifIFD]       Max Aperture Value              : 2.8
[ExifIFD]       Light Source                    : Unknown
[ExifIFD]       Flash                           : Fired
[ExifIFD]       Focal Length                    : 8.0 mm
[ExifIFD]       Flashpix Version                : 0100
[ExifIFD]       Color Space                     : sRGB
[ExifIFD]       Exif Image Width                : 1024
[ExifIFD]       Exif Image Height               : 686
[XMP-x]         XMP Toolkit                     : XMP Core 4.4.0
[XMP-dc]        Description                     : Unidentified cadets.
[XMP-dc]        Subject                         : Stennis, aviation, cadet_activities
[XMP-dc]        Title                           : Lunch on the USS John C. Stennis
[XMP-photoshop] Headline                        : USS John C. Stennis Tour 2000
[Composite]     Aperture                        : 2.9
[Composite]     Image Size                      : 1024x686
[Composite]     Shutter Speed                   : 1/45
[Composite]     Focal Length                    : 8.0 mm
ICBM:1999 0904 CAP Sq47 Carrier Tour tdiaz$

On the #2, yes, that's why I changed the field names even, and Headline isn't one of the ones covered on your table of overlap, yet keywords is- and keywords is the only thing that is working.

tdiaz

  • Jr. Member
  • **
  • Posts: 13
Re: Writting metadata to all images from a CSV file on Mac
« Reply #21 on: December 23, 2011, 12:48:18 AM »
Checking one from Photo Mechanic- these are the fields that get added when I entered four things:
Code: [Select]
[IPTC]          Object Name                     : Title From PhotoMechanic VIRIN
[IPTC]          Keywords                        : Keywords from PhotoMechanic
[IPTC]          Caption-Abstract                : Caption from PhotoMechanic
[IPTC]          Headline                        : Headline from PhotoMechanic

[XMP-photoshop] Headline                        : Headline from PhotoMechanic
[XMP-photoshop] Date Created                    : 1999:09:04 11:52:02-08:00
[XMP-dc]        Subject                         : Keywords from PhotoMechanic
[XMP-dc]        Description                     : Caption from PhotoMechanic
[XMP-dc]        Title                           : Title From PhotoMechanic VIRIN

I have tried using any combination of those field names, to no avail - again, except keywords always work and "Headline" has no duplicate field. 

Code: [Select]
-csv+=file.csv -P -overwrite_original_in_place -r -use MWG .Photo Mechanic calls the Title field VIRIN

I even did a dump of a file: exiftool -csv DSCN4585a.jpg  >output1.txt
Then changed the filename inside it, and:
exiftool -csv+=output1.csv -P -overwrite_original_in_place -r -use MWG .

..and checked with exiftool -a -G1 group74.jpg >group74ET.txt
Got the same results, just the keywords were written. Obviously using the exact field names written by ExifTool. :(

Perhaps I'm just blatantly outright missing something here?
« Last Edit: December 23, 2011, 03:37:55 AM by tdiaz »

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 18415
    • ExifTool Home Page
Re: Writting metadata to all images from a CSV file on Mac
« Reply #22 on: December 23, 2011, 07:26:49 AM »
It doesn't sound like you are missing anything.

Could you email me the JPEG and your CSV files so I can reproduce this myself?  (my mail is philharvey66 at gmail.com)

If I can reproduce the problem then I can figure out what is going wrong.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

tdiaz

  • Jr. Member
  • **
  • Posts: 13
Re: Writting metadata to all images from a CSV file on Mac
« Reply #23 on: December 23, 2011, 12:35:03 PM »
Email has been sent. :)

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 18415
    • ExifTool Home Page
Re: Writting metadata to all images from a CSV file on Mac
« Reply #24 on: December 23, 2011, 02:06:07 PM »
Thanks for the files.

But I don't know what the problem is.  When I used "stennis.csv" to set the metadata for the images you sent, it worked as expected.  First, I changed to the directory containing the images and CSV file (with "cd DIR"), then when I ran the command with the -v2 option, I could see that things were getting written properly for the last 6 files (the first 2 don't have matching filenames in the CSV file, so nothing is done.):

Code: [Select]
> exiftool -csv=stennis.csv . -v2 -use MWG
Reading CSV file stennis.csv
======== ./chowlinePM.jpg
No SourceFile './chowlinePM.jpg' in imported CSV database
(canonical path: '/Users/phil/Desktop/Archive/chowlinePM.jpg')
======== ./DSCN4585a.jpg
No SourceFile './DSCN4585a.jpg' in imported CSV database
(canonical path: '/Users/phil/Desktop/Archive/DSCN4585a.jpg')
======== ./gpsrs.jpg
Setting new values from CSV database
Writing IPTC:Caption-Abstract
Deleting Photoshop:IPTCDigest if value is 'old'
Writing Photoshop:IPTCDigest if tag was deleted
Writing XMP-photoshop:City
Writing IPTC:City if IPTC exists
Writing MIE-Geo:City
Writing Panasonic:City if tag exists
Writing XMP-photoshop:Headline if tag exists
Writing IPTC:Headline
Writing XMP-dc:Subject
Writing IPTC:Keywords if IPTC exists
Writing PostScript:Keywords
Writing PDF:Keywords if tag exists
Writing MIE-Doc:Keywords
Writing XMP-pdf:Keywords if tag exists
Writing XMP-acdsee:Keywords if tag exists
Writing XMP-xmp:Keywords if tag exists
Writing IPTC:ObjectName
Rewriting ./gpsrs.jpg...
  Editing tags in: APP0 APP1 APP13 CIFF ExifIFD IFD0 IPTC JFIF MIE-Doc MIE-Geo MakerNotes PDF Photoshop PostScript XMP
  Creating tags in: APP1 APP13 IPTC MIE-Doc MIE-Geo Photoshop PostScript XMP
JPEG APP1 (6423 bytes):
  Rewriting IFD0
  ExifByteOrder = MM
  Rewriting ExifIFD
  Rewriting InteropIFD
  Rewriting IFD0
Creating APP13:
  Creating Photoshop
  Creating IPTC
    + IPTC:ObjectName = 'Group shot of CAP Senior members at the USS John C. Stennis tour'
    + IPTC:Keywords = 'Stennis, aviation, cadet_activities'
    + IPTC:City = 'San Diego'
    + IPTC:Headline = 'USS John C. Stennis Tour 2001'
    + IPTC:Caption-Abstract = 'Senior Member Gina Gray, George Pruitt, Ben Peterson[snip]'
    + IPTC:ApplicationRecordVersion = '4' (mandatory)
    + Photoshop:IPTCDigest = '...;..._...f....'
Creating APP1:
  Creating XMP
    + XMP-photoshop:City = 'San Diego'
    + XMP-dc:Subject = 'Stennis, aviation, cadet_activities'
JPEG DQT (130 bytes):
JPEG DHT (416 bytes):
JPEG SOF0:
JPEG SOS
======== ./group74.jpg
Setting new values from CSV database
Writing IPTC:Caption-Abstract
Deleting Photoshop:IPTCDigest if value is 'old'
Writing Photoshop:IPTCDigest if tag was deleted
Writing XMP-photoshop:City
Writing IPTC:City if IPTC exists
Writing MIE-Geo:City
Writing Panasonic:City if tag exists
Writing XMP-photoshop:Headline if tag exists
Writing IPTC:Headline
Writing XMP-dc:Subject
Writing IPTC:Keywords if IPTC exists
Writing PostScript:Keywords
Writing PDF:Keywords if tag exists
Writing MIE-Doc:Keywords
Writing XMP-pdf:Keywords if tag exists
Writing XMP-acdsee:Keywords if tag exists
Writing XMP-xmp:Keywords if tag exists
Writing IPTC:ObjectName
Rewriting ./group74.jpg...
  Editing tags in: APP0 APP1 APP13 CIFF ExifIFD IFD0 IPTC JFIF MIE-Doc MIE-Geo MakerNotes PDF Photoshop PostScript XMP
  Creating tags in: APP1 APP13 IPTC MIE-Doc MIE-Geo Photoshop PostScript XMP
JPEG APP1 (6333 bytes):
  Rewriting IFD0
  ExifByteOrder = MM
  Rewriting ExifIFD
  Rewriting InteropIFD
  Rewriting IFD0
Creating APP13:
  Creating Photoshop
  Creating IPTC
    + IPTC:ObjectName = 'Group Photo of the Carrier Tour 1999'
    + IPTC:Keywords = 'Stennis, aviation, cadet_activities'
    + IPTC:City = 'San Diego'
    + IPTC:Headline = 'USS John C. Stennis Tour 2002'
    + IPTC:Caption-Abstract = 'Unidentified CAP Members, Navy Personnel and family'
    + IPTC:ApplicationRecordVersion = '4' (mandatory)
    + Photoshop:IPTCDigest = '....z.C.$..FIvM.'
Creating APP1:
  Creating XMP
    + XMP-photoshop:City = 'San Diego'
    + XMP-dc:Subject = 'Stennis, aviation, cadet_activities'
JPEG DQT (130 bytes):
JPEG DHT (416 bytes):
JPEG SOF0:
JPEG SOS
======== ./groupintruder.jpg
Setting new values from CSV database
Writing IPTC:Caption-Abstract
Deleting Photoshop:IPTCDigest if value is 'old'
Writing Photoshop:IPTCDigest if tag was deleted
Writing XMP-photoshop:City
Writing IPTC:City if IPTC exists
Writing MIE-Geo:City
Writing Panasonic:City if tag exists
Writing XMP-photoshop:Headline if tag exists
Writing IPTC:Headline
Writing XMP-dc:Subject
Writing IPTC:Keywords if IPTC exists
Writing PostScript:Keywords
Writing PDF:Keywords if tag exists
Writing MIE-Doc:Keywords
Writing XMP-pdf:Keywords if tag exists
Writing XMP-acdsee:Keywords if tag exists
Writing XMP-xmp:Keywords if tag exists
Writing IPTC:ObjectName
[minor] IPTC:ObjectName exceeds length limit (truncated)
Rewriting ./groupintruder.jpg...
  Editing tags in: APP0 APP1 APP13 CIFF ExifIFD IFD0 IPTC JFIF MIE-Doc MIE-Geo MakerNotes PDF Photoshop PostScript XMP
  Creating tags in: APP1 APP13 IPTC MIE-Doc MIE-Geo Photoshop PostScript XMP
JPEG APP1 (6187 bytes):
  Rewriting IFD0
  ExifByteOrder = MM
  Rewriting ExifIFD
  Rewriting InteropIFD
  Rewriting IFD0
Creating APP13:
  Creating Photoshop
  Creating IPTC
    + IPTC:ObjectName = 'Squadron 47 touring an Intruder on the USS John C. Stennis fligh'
    + IPTC:Keywords = 'Stennis, aviation, cadet_activities'
    + IPTC:City = 'San Diego'
    + IPTC:Headline = 'USS John C. Stennis Tour 2003'
    + IPTC:Caption-Abstract = 'Senior Member Mike Woods and unidentified Cadet Members'
    + IPTC:ApplicationRecordVersion = '4' (mandatory)
    + Photoshop:IPTCDigest = 'Wb..k.[......un.'
Creating APP1:
  Creating XMP
    + XMP-photoshop:City = 'San Diego'
    + XMP-dc:Subject = 'Stennis, aviation, cadet_activities'
JPEG DQT (130 bytes):
JPEG DHT (416 bytes):
JPEG SOF0:
JPEG SOS
======== ./groupshot.jpg
Setting new values from CSV database
Writing IPTC:Caption-Abstract
Deleting Photoshop:IPTCDigest if value is 'old'
Writing Photoshop:IPTCDigest if tag was deleted
Writing XMP-photoshop:City
Writing IPTC:City if IPTC exists
Writing MIE-Geo:City
Writing Panasonic:City if tag exists
Writing XMP-photoshop:Headline if tag exists
Writing IPTC:Headline
Writing XMP-dc:Subject
Writing IPTC:Keywords if IPTC exists
Writing PostScript:Keywords
Writing PDF:Keywords if tag exists
Writing MIE-Doc:Keywords
Writing XMP-pdf:Keywords if tag exists
Writing XMP-acdsee:Keywords if tag exists
Writing XMP-xmp:Keywords if tag exists
Writing IPTC:ObjectName
Rewriting ./groupshot.jpg...
  Editing tags in: APP0 APP1 APP13 CIFF ExifIFD IFD0 IPTC JFIF MIE-Doc MIE-Geo MakerNotes PDF Photoshop PostScript XMP
  Creating tags in: APP1 APP13 IPTC MIE-Doc MIE-Geo Photoshop PostScript XMP
JPEG APP1 (6275 bytes):
  Rewriting IFD0
  ExifByteOrder = MM
  Rewriting ExifIFD
  Rewriting InteropIFD
  Rewriting IFD0
Creating APP13:
  Creating Photoshop
  Creating IPTC
    + IPTC:ObjectName = 'Squadron 47 Gathers before boarding the USS John C. Stennis'
    + IPTC:Keywords = 'Stennis, aviation, cadet_activities'
    + IPTC:City = 'San Diego'
    + IPTC:Headline = 'USS John C. Stennis Tour 2004'
    + IPTC:Caption-Abstract = 'Senior Member George Pruitt, Ben Peterson, Mike Wood[snip]'
    + IPTC:ApplicationRecordVersion = '4' (mandatory)
    + Photoshop:IPTCDigest = '(.'....T...b."n.'
Creating APP1:
  Creating XMP
    + XMP-photoshop:City = 'San Diego'
    + XMP-dc:Subject = 'Stennis, aviation, cadet_activities'
JPEG DQT (130 bytes):
JPEG DHT (416 bytes):
JPEG SOF0:
JPEG SOS
======== ./madridsim.jpg
Setting new values from CSV database
Writing IPTC:Caption-Abstract
Deleting Photoshop:IPTCDigest if value is 'old'
Writing Photoshop:IPTCDigest if tag was deleted
Writing XMP-photoshop:City
Writing IPTC:City if IPTC exists
Writing MIE-Geo:City
Writing Panasonic:City if tag exists
Writing XMP-photoshop:Headline if tag exists
Writing IPTC:Headline
Writing XMP-dc:Subject
Writing IPTC:Keywords if IPTC exists
Writing PostScript:Keywords
Writing PDF:Keywords if tag exists
Writing MIE-Doc:Keywords
Writing XMP-pdf:Keywords if tag exists
Writing XMP-acdsee:Keywords if tag exists
Writing XMP-xmp:Keywords if tag exists
Writing IPTC:ObjectName
[minor] IPTC:ObjectName exceeds length limit (truncated)
Rewriting ./madridsim.jpg...
  Editing tags in: APP0 APP1 APP13 CIFF ExifIFD IFD0 IPTC JFIF MIE-Doc MIE-Geo MakerNotes PDF Photoshop PostScript XMP
  Creating tags in: APP1 APP13 IPTC MIE-Doc MIE-Geo Photoshop PostScript XMP
JPEG APP1 (6383 bytes):
  Rewriting IFD0
  ExifByteOrder = MM
  Rewriting ExifIFD
  Rewriting InteropIFD
  Rewriting IFD0
Creating APP13:
  Creating Photoshop
  Creating IPTC
    + IPTC:ObjectName = 'A Squadron 47 cadet sits at the simulator on the USS John C. Ste'
    + IPTC:Keywords = 'Stennis, aviation, cadet_activities'
    + IPTC:City = 'San Diego'
    + IPTC:Headline = 'USS John C. Stennis Tour 2005'
    + IPTC:Caption-Abstract = 'Unidentified cadet'
    + IPTC:ApplicationRecordVersion = '4' (mandatory)
    + Photoshop:IPTCDigest = '.>z!)..o.C9.....'
Creating APP1:
  Creating XMP
    + XMP-photoshop:City = 'San Diego'
    + XMP-dc:Subject = 'Stennis, aviation, cadet_activities'
JPEG DQT (130 bytes):
JPEG DHT (416 bytes):
JPEG SOF0:
JPEG SOS
======== ./radarhanson.jpg
Setting new values from CSV database
Writing IPTC:Caption-Abstract
Deleting Photoshop:IPTCDigest if value is 'old'
Writing Photoshop:IPTCDigest if tag was deleted
Writing XMP-photoshop:City
Writing IPTC:City if IPTC exists
Writing MIE-Geo:City
Writing Panasonic:City if tag exists
Writing XMP-photoshop:Headline if tag exists
Writing IPTC:Headline
Writing XMP-dc:Subject
Writing IPTC:Keywords if IPTC exists
Writing PostScript:Keywords
Writing PDF:Keywords if tag exists
Writing MIE-Doc:Keywords
Writing XMP-pdf:Keywords if tag exists
Writing XMP-acdsee:Keywords if tag exists
Writing XMP-xmp:Keywords if tag exists
Writing IPTC:ObjectName
Rewriting ./radarhanson.jpg...
  Editing tags in: APP0 APP1 APP13 CIFF ExifIFD IFD0 IPTC JFIF MIE-Doc MIE-Geo MakerNotes PDF Photoshop PostScript XMP
  Creating tags in: APP1 APP13 IPTC MIE-Doc MIE-Geo Photoshop PostScript XMP
JPEG APP1 (6229 bytes):
  Rewriting IFD0
  ExifByteOrder = MM
  Rewriting ExifIFD
  Rewriting InteropIFD
  Rewriting IFD0
Creating APP13:
  Creating Photoshop
  Creating IPTC
    + IPTC:ObjectName = 'Cadets get a look at the radar on the USS John C. Stennis.'
    + IPTC:Keywords = 'Stennis, aviation, cadet_activities'
    + IPTC:City = 'San Diego'
    + IPTC:Headline = 'USS John C. Stennis Tour 2006'
    + IPTC:Caption-Abstract = 'Unidentified cadets'
    + IPTC:ApplicationRecordVersion = '4' (mandatory)
    + Photoshop:IPTCDigest = '..X.[C4ui.0.U..H'
Creating APP1:
  Creating XMP
    + XMP-photoshop:City = 'San Diego'
    + XMP-dc:Subject = 'Stennis, aviation, cadet_activities'
JPEG DQT (130 bytes):
JPEG DHT (416 bytes):
JPEG SOF0:
JPEG SOS
    1 directories scanned
    6 image files updated

And when I read back something (caption-abstract for example), it matches the data in the CSV file for the last 6 files:

Code: [Select]
> exiftool -caption-abstract .
======== ./chowlinePM.jpg
Caption-Abstract                : Caption from PhotoMechanic
======== ./DSCN4585a.jpg
Caption-Abstract                : CAPF 431, Capt. Diaz
======== ./gpsrs.jpg
Caption-Abstract                : Senior Member Gina Gray, George Pruitt, Ben Peterson and an unidentified woman
======== ./group74.jpg
Caption-Abstract                : Unidentified CAP Members, Navy Personnel and family
======== ./groupintruder.jpg
Caption-Abstract                : Senior Member Mike Woods and unidentified Cadet Members
======== ./groupshot.jpg
Caption-Abstract                : Senior Member George Pruitt, Ben Peterson, Mike Woods, Ed Ferrell and unidentified cadets
======== ./madridsim.jpg
Caption-Abstract                : Unidentified cadet
======== ./radarhanson.jpg
Caption-Abstract                : Unidentified cadets

I am using ExifTool 8.73 here, but the results should be the same with 8.71 (which you are using).  Do you get the same results as above when running these same commands on the files you sent?

- Phil
« Last Edit: December 23, 2011, 02:12:07 PM by Phil Harvey »
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

tdiaz

  • Jr. Member
  • **
  • Posts: 13
Re: Writting metadata to all images from a CSV file on Mac
« Reply #25 on: December 24, 2011, 12:18:23 PM »
Your command examples worked for me as well. Since in the simplest form you did it, it worked I added the rest of my flags and came up with no issues until I set it to append (keywords) instead of replace. Apparently it stumbles on trying to append the rest of the stuff?

Does not work:
Code: [Select]
exiftool -csv+=stennis.csv . -P -overwrite_original_in_place -r -v2 -use MWGWorks:
Code: [Select]
exiftool -csv=stennis.csv . -P -overwrite_original_in_place -r -v2 -use MWG
Removed the '+'

I think one of the things I tried was to remove the keyword column from the file as well. 

Now I'm trying to figure out if there's a different field to use because it seems that Exiftool truncates the title at 64 characters yet Aperture, Lightroom, iPhoto and Photo Mechanic do not.

In looking at specs I see that there is a legacy note for 64 characters on one of the field names that is shared by the same data, but the others all say 2000 characters.

Is there a list for ExifTool and what the max values it works with are?

On keywords, do I want commas separating them, and underscores for spaces when it's more than one word, like is common on forums and such, or do I just leave them all as individual words?

IE: cadet_activities, aviation, flight
or: cadet activities aviation flight

Would ExifTool support any other character as a delimiter except a comma? Like tab? Or a set number of spaces?
Trying to come up with a way of using Excel plainly, as OpenOffice works for saving csv with qualifiers, but is kinda hokey to work with otherwise. Herky-Jerky-Java crap, and does all kinds of weird things with fonts, cell sizes and wrapping when pasting data in. 

The attached screen shot shows a file exported by Aperture as one example of support for more characters, and the other is truncated during processing by Exiftool.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 18415
    • ExifTool Home Page
Re: Writting metadata to all images from a CSV file on Mac
« Reply #26 on: December 24, 2011, 12:48:51 PM »
Does not work:
Code: [Select]
exiftool -csv+=stennis.csv . -P -overwrite_original_in_place -r -v2 -use MWGWorks:
Code: [Select]
exiftool -csv=stennis.csv . -P -overwrite_original_in_place -r -v2 -use MWG

Ah ha!  Excellent!  This isn't functioning as I had intended.  Thanks for sticking with this until we found the problem.  I will fix this in version 8.74.

Quote
Now I'm trying to figure out if there's a different field to use because it seems that Exiftool truncates the title at 64 characters yet Aperture, Lightroom, iPhoto and Photo Mechanic do not.

See the IPTC tag name documentation for details about this.  (Read the 3rd paragraph)  Or, an alternative is to use XMP instead of IPTC since it doesn't have any length limitations.

Quote
On keywords, do I want commas separating them, and underscores for spaces when it's more than one word, like is common on forums and such, or do I just leave them all as individual words?

Keywords should be stored separately.  You should probably be using -sep ", " on the command line when writing.  See FAQ number 17 for details.

Quote
Would ExifTool support any other character as a delimiter except a comma? Like tab? Or a set number of spaces?

Yes, this is specified with the -sep option.
 
- Phil
« Last Edit: December 24, 2011, 12:53:57 PM by Phil Harvey »
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

tdiaz

  • Jr. Member
  • **
  • Posts: 13
Re: Writting metadata to all images from a CSV file on Mac
« Reply #27 on: December 24, 2011, 03:41:17 PM »
Okay, so in reality it's better to just put the keywords in the CSV as "key words like this" - doesn't matter because I have not done those yet.  If I have instances where I do desire there be commas in the keywords I would use -sep "//" and have them be "key, word//like//this" but in this project I don' t think so.. 

The part about the separator that I was commenting on was the use of the global separator. Because some descriptions have commas in them, and Excel is hugely inflexible with it's separated values saving. Importing is one thing, exporting is another. You can specify the Qualifier and Delimiter on an import. You can't add a Qualifier at all on export/save. ..and there's a few VBA solutions for that but none of them work well on Excel 2011.

But you can save a tab or space delimited file from Excel.. spaces wouldn't really work unless you did something like 5 or more just to be sure, but tabs could work.

Thanks for the support, this is an amazingly flexible tool. I really want to have my data embedded in photos, and the original dates intact in the filesystem for purposes of archiving and this allows that. Then I can import into Aperture and have it all done. I could even do work in Aperture and export, and use this to reset dates, where applicable.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 18415
    • ExifTool Home Page
Re: Writting metadata to all images from a CSV file on Mac
« Reply #28 on: December 28, 2011, 04:23:29 PM »
Version 8.74 is now available, and the -csv+= feature should now work as documented.

Thanks again for helping to track down this bug.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).