Automatic Twitter update via bash script and cron..

hehe.. tweet..=~

create a shell script (go_tweet) with following content..

msg="$1 as of $date"
curl --basic --user "username:password" \
--data-ascii "status=`perl -MURI::Escape -e \
"print uri_escape('$msg');"`" \

Replace the username:password with your tweet account ..
It is recommended to register a new one for this purpose only if security is your major concern.

put somewhere is /usr/local/bin/ or somewhere that you remember..

chmod a+x /usr/local/bin/go_tweet

then.. to update.. just need to run..

/usr/local/bin/go_tweet "your message here.."

for auto update every hour ..

crontab -e

add a line to post uptime output each time..

5 * * * * /usr/local/bin/go_tweet `uptime`

else you can modify it to suit whatever message that you might want to post..

if want to lock twitter to be followed / seen by approved personal only ..
go to home Twitter -> Settings.

tick the Protect update.

and each user that want to follow your update will have to request.. and to be approved you before they can see the update.


p/s : might be useful during content filtering of "Silly Season" soon.. fetching needed RSS / news update only..

my twitter is now feeding live example of weather forecast for every 12 hour.. .. any other ideas to be added ?

for this blog feed only is at