No Need for Twitter

animus wisdom Add comments

hackergochi
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:

Download Package

—- 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:

Download Script

4 Responses to “No Need for Twitter”

  1. Sjaddow Says:

    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

  2. Michiel van Wessem Says:

    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 :)

  3. Chani Says:

    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*

  4. Andrew Min Says:

    I like it. You oughta submit this to KDE-Apps

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in