Last active
December 16, 2015 09:18
-
-
Save strangecode/5411767 to your computer and use it in GitHub Desktop.
flicker_upload wrapper prompts for image title, desc, tags. Requires flickr_upload and Flickr::Upload perl module. http://search.cpan.org/~cpb/Flickr-Upload/flickr_upload
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 | |
usage () { | |
echo "Usage: $(basename $0) FILENAME"; | |
echo "You will be prompted for title, desc, and tags."; | |
exit 1; | |
} | |
[[ -z "$@" ]] && usage; | |
echo "Uploading $# files:"; | |
for F in "$@"; do | |
echo " $F"; | |
done | |
echo "Gimme details for all images (or ctrl-c to cancel)..."; | |
read -p 'Title: ' TITLE; | |
read -p 'Description: ' DESC; | |
read -p 'Tags (space seperated) [tweet]: ' TAGS; | |
[[ -z "$TAGS" ]] && TAGS='tweet'; | |
flickr_upload --title="$TITLE" --description="$DESC" --tag="$TAGS" "$@"; | |
if [[ $? != 0 ]]; then | |
echo "$? images failed uploading!"; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment