
I just updated my Amarok Twitter Script, added a few suggestions sent to me by Charles Nepote.
Install:
1) In AmaroK goto Tools > Script Manager
2) Hit install and select the downloaded package.
3) After install right click on “twitter-update.sh” and select “Edit”.
4) Customise your Username and Password in the specified location and save.
5) Now hit Run and Close.
Download:
—- Also updated my twitter from console script
#!/bin/bash
#
# Twitter Update
#
# Requires: cURL http://curl.haxx.se/
# By Guillermo Antonio Amaral Bastidas < gamaral@guillermoamaral.com >
#
### CONFIGURE ###
declare -rx USERNAME=”YOUR_USERNAME”
declare -rx PASSWORD=”YOUR_PASSWORD”
### DONT MODIFY ###
declare -x STATUS=”$@”
curl ‘http://twitter.com/statuses/update.xml’ \
-u ${USERNAME}:${PASSWORD} \
-d “status=${STATUS}” > /dev/null 2> /dev/null
# EOF
Usage:
./twitter Update from console woot
Download:
April 11th, 2008 at 1:53 pm
Hi, considered fetching username and password from the kdewallet?
WALLET=$(dcop kded kwalletd open kdewallet 0)
USERNAME=$(dcop kded kwalletd readPassword $WALLET Passwords “twitter.amarokscript.username”)
PASSWORD=$(dcop kded kwalletd readPassword $WALLET Passwords “twitter.amarokscript.password”)
…after adding the keys “twitter.amarokscript.username and twitter.amarokscript.password keys under Passwords in the Passwords folder in you kdewallet using kdewalletmanager.
For this to work in konsole you need to start konsole with the –script parameter:
konsole –script
April 11th, 2008 at 2:52 pm
Not bad and it works perfectly. However I have more than one user using twitter and to have one script work for them I modified it as follows:
### CONFIGURE ###
# READ USERS CONFIG.
if [[ -r ${HOME}/.twitterrc ]]; then
source ${HOME}/.twitterrc
fi
declare -rx USERNAME=”${YOUR_USERNAME}”
declare -rx PASSWORD=”${YOUR_PASSWORD}”
ofcourse, got to make sure that .twitterrc is only readable by the user. But tested it and it works :)
April 12th, 2008 at 1:01 am
what, you’re not using the twitter plasmoid? ;)
hmm. the kwallet commenter made me think… the plasmoid also stores twitter passwords, but maybe these shouldn’t be hidden away in their own place in kwallet. maybe this script should share them. *shrug*
April 20th, 2008 at 10:51 am
I like it. You oughta submit this to KDE-Apps