write title and description metadata into multiple jpg files for use in Flickr

Started by red192, June 13, 2017, 10:51:19 PM

Previous topic - Next topic

red192

Hello thanks in advance for any tips or direction.

I've got a few thousand images to load on Flickr -- and the club wants each if them to display a unique title and and description. I have the variable by file name in a spreadsheet -- and have partially figured out how to create a csv file from my folder of images -- but I'm lost on how to prepare the csv file so exiftool can be used to write the correct IPTC? tags for Flickr title and description back into each jpg. I have read a few posts that got me close, but not sure to to specify the tags correctly.


StarGeek

The tags that flickr reads for the title are IPTC:Headline, IPTC:ObjectName, XMP-dc:Title, and FileName, in that order.  Description is populated by IPTC:Caption-Abstract, XMP-dc:Description, and EXIF:ImageDescription.  So you can set IPTC:Headline and IPTC:Caption-Abstract and Flickr should populate the title and description properly.

You'll want to read the docs on -csv and FAQ 26 the full info.  But the short version is that you'll need three columns.  The first row (the header row) should be SourceFile, IPTC:Headline, IPTC:Caption-Abstract. You can swap Headline and Caption-Abstract if you want, but the first entry needs to be SourceFile

The first column needs to contain the full path to each file.  The other columns would have the proper data.  As an example
SourceFile,IPTC:Headline,IPTC:Caption-Abstract
X:/!temp/Test3.jpg,Here's the title,Here's the description


After that, you just need to use exiftool -csv="/path/to/file.csv" /Target/Directory

If you need to deal with any other metadata Flickr reads, I went ahead and posted what I know here.

* 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).

red192

This is fantastic! Thank you for taking the time to prepare such a complete, cogent and perspicacious response to  my newbie question! I will report back with my results.

red192

Success!

I placed all the jpgs in a folder on my mac and navigated to that folder using the terminal. I then ran:
exiftool -common -csv .  > out.csv
This gave me a .csv with the all the filenames. Luckily, all the files were named by their catalog number. I was then able to use MS Access to run a query that added the metadata fields to the SourceFile fields. Then using your instruction, the file looked like this:

SourceFile, IPTC:Headline, IPTC:Caption-Abstract
./001-3_34432595234_o.jpg, Guild Mystery 2015 - Joyce Cole,Made from a Civil War jelly roll. Quilted by: Becky Sekulovski


Then I ran the command
exiftool -csv=quiltdata.csv .

The first time I got the dreaded
Warning: Malformed UTF-8 character(s)

I had used an — emdash instead of a plain old - dash. I fixed that, and it worked like a champ. Flicker reads the info and pops the title and description into place. NICE ONE! New know-how!! The ladies of the quilt guild are gonna be just giddy. Thanks.


StarGeek

* 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).

HDavis

This post has been very helpful. As I have been working on this, I have discovered a few details. (mac OS 10.2.5)
- In the CSV file, the case of the letters matters. "Sourcefile" causes an error. "SourceFile" works
- Put the CSV file in the same folder as the images being updated
- Do not put an ending slash in the directory

I backed up my images before making the changes.

The command worked for me:

exiftool -overwrite_original -csv=/Path_p01/Path_p02/CHANGE_FILE.CSV /Path_p01/Path_p02

Phil Harvey

Quote from: HDavis on June 18, 2017, 09:32:39 PM
- In the CSV file, the case of the letters matters. "Sourcefile" causes an error. "SourceFile" works

Good point.  I will make this case insensitive in ExifTool 10.57.

Quote- Put the CSV file in the same folder as the images being updated

This is not necessary.  The only constraint is that the SourceFile entries have the correct path from the current directory (or if the have absolute paths, then the current directory doesn't matter at all).

[/quote]- Do not put an ending slash in the directory[/quote]

This shouldn't matter.  I just tested this on OS X and it works fine with or without the trailing slash:

> exiftool -csv tmp > out.csv
    1 directories scanned
    1 image files read
> exiftool -csv=out.csv tmp
    1 directories scanned
    1 image files updated
> exiftool -csv=out.csv tmp/
    1 directories scanned
    1 image files updated


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