Skip to content

Instantly share code, notes, and snippets.

@strangecode
Last active December 16, 2015 09:18
Show Gist options
  • Save strangecode/5411767 to your computer and use it in GitHub Desktop.
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
#!/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