Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Upload to twitpic v1.2.12
- #By kurobyte <[email protected]>
- # http://kuroscript.wordpress.com/
- #
- # Dependences
- # sendemail, zenity, libnotify
- #
- # Configure
- #
- # 1- you need to link your twitter account to twitpic and
- # get your twitpicEmail in here "http://twitpic.com/account/settings"
- # 2- yourEmail, you need to add your email and password to give a eay
- # to send the image to the twitpic
- # 3- userMail the name of your account, if you have a google account
- # you don't need to ad all the email
- # ex: "test" no google "[email protected]"
- # 4- Configure your smtp server depending your address.
- # gmail - smtp.gmail.com:587
- # hotmail - smtp.live.com:587
- # yahoo - smtp.mail.yahoo.com:995
- #
- #others "http://www.emailaddressmanager.com/tips/mail-settings.html"
- #
- # 5- Enjoy and comment ;)
- #
- twitpicEmail="[email protected]"
- yourEmail="[email protected]"
- yourEmailPasswd='[TOPO SECRET]'
- userMail="XXXXX"
- mailServer="smtp.gmail.com:587"
- #####END OF CONFIG
- #
- # Execute
- #
- sendFile="$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"
- filename=$(basename "$sendFile")
- extension="${filename##*.}"
- if [ $extension == png ] || [ $extension == jpg ] || [ $extension == gif ]
- then
- {
- twitMessage=`zenity --entry \
- --title="Image Caption" \
- --text="Insert the captión of the image (This will be tweeted):" \
- --entry-text ""`
- sendemail -f $yourEmail -t $twitpicEmail -u "$twitMessage" -m "Sended by Upload To twitpic, nautilus plug-in developed by Kurobyte." -s $mailServer -o tls=yes -a "`echo $sendFile`" -xu $userMail -xp "$yourEmailPasswd"
- if [ $? == 0 ];
- then
- {
- notify-send --hint=int:transient:1 --icon="$sendFile" "Image Tweeted" "Tweet: \"$twitMessage\""
- }
- else
- {
- notify-send --hint=int:transient:1 --icon="" "Problem Tweeting Image" "Something is wrong"
- }
- fi
- }
- else
- {
- notify-send --hint=int:transient:1 --icon="" "Invalid image format" "Valids: .png, .jpg, .gif"
- }
- fi
Advertisement
Add Comment
Please, Sign In to add comment