I’ve been playing around with Geektool on my work MacBook, and I think it is a really great tool. It add a prefPane to your System Preferences that allows you to place “widgets” (called Geeklets) on your desktop. The three options to choose from are files, pictures, or shell. As a bash geek, I’ve created all sorts of shell scripts all over my desktop. Here is one of my favorites.
View identica friends list in bash
I have a proxy at work and no proxy at home, so I have a ProxySet variable to check that so I can use the proxy settings in curl if I need to. This will only work on osx. I am working on a linux script for home, I’ll post that when it is done. If you don’t need to check your proxy or are going to use this on linux just edit the proxy stuff out and it should work.
Also you will need to change the http link that curl grabs. My user name is cghouly (follow me for updates) so you will need to change that to your username in the script.
ProxySet=`system_profiler SPNetworkDataType | grep "HTTP Proxy Enabled: Yes"`
if [ "$ProxySet" != "" ]
then
ProxyAddress=`system_profiler SPNetworkDataType | grep "HTTP Proxy Server" | awk '{print $4}' | head -1`
ProxyPort=`system_profiler SPNetworkDataType | grep "HTTP Proxy Port" | awk '{print $4}' | head -1`
curl -s -x "$ProxyAddress":"$ProxyPort" http://identi.ca/api/statuses/friends_timeline/cghouly.rss > /tmp/identica.rss
else
curl -s http://identi.ca/api/statuses/friends_timeline/cghouly.rss > /tmp/identica.rss
fi
grep "" /tmp/identica.rss | sed -e 's/<[^>]*>//g'
This is a simple script and I don’t claim to be the best at bash code, but it works for what I wanted. Let me know if it works for you.


Leave a comment
Comments feed for this article