Created
March 30, 2013 14:35
-
-
Save x2q/5276931 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
| # Script by Black God (http://www.karuppuswamy.com) | |
| # This script uploads pictures to Picasa from current directory, | |
| # or in the selected directory | |
| base="`echo $NAUTILUS_SCRIPT_CURRENT_URI | cut -d'/' -f3- | sed 's/%20/ /g'`" | |
| if [ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]; then | |
| dir="$base" | |
| else | |
| while [ ! -z "$1" -a ! -d "$base/$1" ]; do shift; done | |
| dir="$base/$1" | |
| fi | |
| album=`echo $dir | awk -F/ '{print $NF }'` | |
| notify-send -i "gtk-go-up" "Picasa upload" "`printf "Your $album album is being uploaded from $dir ..."`" | |
| google picasa create --title "$album" "$dir"/* | |
| if [ "$?" -ne "0" ]; then | |
| notify-send -i "process-stop" "Picasa upload" "`printf "Your $album album upload failed"`" | |
| else | |
| notify-send -i "gtk-ok" "Picasa upload" "`printf "Your $album album upload is successful"`" | |
| fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment