GeekTool and WordPress Stats

Geektool DesktopI wanted to have today’s WordPress stats on my desktop beside my GeekTool calendar and weather. It wasn’t on the internet anywhere so I spent a few minutes and did it myself.

You’ll need your API key and domain name. Simply put a new shell geeklet on your desktop with the following in the command line with the obvious variables replaced.

curl --silent "http://stats.wordpress.com/csv.php?format=xml&api_key=############&blog_uri=http://DOMAIN.COM&table=views&days=1" | grep -E '(|)' | sed -e 's///' -e 's/<\/total>//'

You’ll also want to adjust the refresh rate to 180 as the API documentation has requested.

If you want to adjust the information displayed, you’ll need to make changes to the query. WordPress Stats API documentation is here.

2 comments » Write a comment

  1. They call it GeekTool for a reason. You can do absolutely anything with it, as long as you are geeky enough.

Leave a Reply

%d bloggers like this: