Skip to content

Instantly share code, notes, and snippets.

@henrik
Last active August 18, 2017 01:29
Show Gist options
  • Save henrik/6999038 to your computer and use it in GitHub Desktop.
Save henrik/6999038 to your computer and use it in GitHub Desktop.
Move JPG metadata keywords into description field and then strip keywords. For importing to iPhoto. Preserves the info in the keywords but doesn't introduce them into your own keyword space.

If an image has Caption-Abstract, ImageDescription and Description, it seems iPhoto (and the cmd+i window in Finder) prefers them in that order.

# Pick values from other desc fields if only those are present.
exiftool '-ImageDescription<Description' -if 'not $ImageDescription' -overwrite_original .
exiftool '-Caption-Abstract<ImageDescription' -if 'not $Caption-Abstract' -overwrite_original .
# append keywords to desc
exiftool -if '$keywords' -overwrite_original -f '-Caption-Abstract<${Caption-Abstract} (Original keywords: ${keywords})' -keywords='' .
# list various descs
exiftool -keywords -description -ImageDescription -Caption-Abstract *.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment