Last active
October 24, 2015 02:54
-
-
Save Birchwell/8d8e4b8ca7722c28d193 to your computer and use it in GitHub Desktop.
This Exiftool bash script will allow the user to populate 18 YAD fields with metadata for images. Useful for uploading images to Flickr.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
exiftoolform=$(yad --title "ExifTool" --form --width=700 --columns=2 --field="Artist:" --field="Copyright:" --field="City:" --field="State:" --field="Country:" --field="Creator:" --field="Rights:" --field="By-line:" --field="Headline:" --field="Description:" --field="Keywords 1:" --field="Keywords 2:" --field="Keywords 3:" --field="Keywords 4:" --field="Keywords 5:" --field="Keywords 6:" --field="Keywords 7:" --field="Keywords 8:" "John Doe" "(c) 2015 John Doe" "Chicago" "Illinois" "United States" "John Doe" "(c) 2015 John Doe" "John Doe") | |
OldIFS="$IFS"; IFS='|' # Save the old IFS value to OldIFS and give the new value to IFS. | |
read ARTIST COPYRIGHT CITY STATE COUNTRY CREATOR RIGHTS BYLINE HEADLINE DESCRIPTION KEYWORDSONE KEYWORDSTWO KEYWORDSTHREE KEYWORDSFOUR KEYWORDSFIVE KEYWORDSSIX KEYWORDSSEVEN KEYWORDSEIGHT <<< "$exiftoolform" | |
IFS="$OldIFS" # Give IFS back its original value. | |
exiftool -artist="$ARTIST" -copyright="$COPYRIGHT" -city="$CITY" -state="$STATE" -country="$COUNTRY" -creator="$CREATOR" -rights="$RIGHTS" -byline="$BYLINE" -headline="$HEADLINE" -description="$DESCRIPTION" -keywords="$KEYWORDSONE" -keywords="$KEYWORDSTWO" -keywords="$KEYWORDSTHREE" -keywords="$KEYWORDSFOUR" -keywords="$KEYWORDSFIVE" -keywords="$KEYWORDSSIX" -keywords="$KEYWORDSSEVEN" -keywords="$KEYWORDSEIGHT" $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment