Skip to content

Instantly share code, notes, and snippets.

@pedz
Created June 10, 2022 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedz/cc47ccc8d8b64a77ab623a9ca1a16636 to your computer and use it in GitHub Desktop.
Save pedz/cc47ccc8d8b64a77ab623a9ca1a16636 to your computer and use it in GitHub Desktop.
I have an export setting for Instagram. Others use a print setting I believe. In any case, I export with all of the metadata and keywords. I add my title and Caption in Lightroom like a good little boy before hand. Add my keywords, etc. In the past, I would then go to Instagram and make my post copying all of that by hand. This little script sim…
#!/usr/bin/env zsh
function tag
{
exiftool -s3 -$1 $2
}
FILE=$1
shift
keywords=( '#'${^argv:gs/ //} )
desc=$( tag 'IPTC:Caption-Abstract' $FILE )
lens=$( tag 'EXIF:LensModel' $FILE )
camera=$( tag 'EXIF:Model' $FILE )
software=$( tag 'EXIF:Software' $FILE )
iso=$( tag 'EXIF:ISO' $FILE )
f_stop=$( tag 'EXIF:FNumber' $FILE )
f_length=$( tag 'EXIF:FocalLength' $FILE )
exposure=$( tag 'EXIF:ExposureTime' $FILE )
copyright=$( tag 'EXIF:Copyright' $FILE )
usage=$( tag 'XMP:UsageTerms' $FILE )
title=$( tag 'XMP:Title' $FILE )
TEMP=$IFS
IFS=,
temp=( $( tag 'IPTC:Keywords' $FILE ) )
IFS=$TEMP
keywords+=( '#'${^temp:gs/ //} )
echo $title
echo .
echo $desc
echo .
echo "ISO ${iso}, ${exposure}s, f/${f_stop}"
echo .
echo Hardware:
echo $camera
echo $lens @ $f_length
echo .
echo Software:
echo $software
echo .
echo Keywords:
echo $keywords
echo .
echo Copyright:
echo $copyright
echo $usage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment