Nerdism
Random geek stuff I save for later reference. Maybe it’ll be useful for others, too. Who knows.

bit.ly, python, and quicksilver (plus growl)

A fellow, Graham, made a nice little python script to shorten urls with bit.ly here.

I modified it to add a growl notification, authentication support (via your bit.ly apikey), and added the option for an argument (for those that want to run it in the terminal and paste in a URL manually). Hope someone else finds it useful… it took me longer than it should have to figure out how to parse the JSON returned by the query with python and the simplejson module :P .

Thanks Graham.

UPDATE: I added the script to my Google Code page. Click here for the latest version of this script.

3 Responses to “bit.ly, python, and quicksilver (plus growl)”

  1. This script has thought me three things I wasn’t aware of before (1st time pythin scripter):

    1. Indentation matters in python
    2. how to install simplejson
    3. set up growlnotify (is not default when installing growl)

    So that was a great learning experience!

    Now the script does what it should do with Safari, I just have a small problem with Firefox which I am sure I can solve after some more poking around.

  2. Nice updates to the code!

  3. Thanks! :)

    It was nice code… to update! I was looking all over the internet to find a utility to do what I had wanted and your solution was perfect for my needs.


Leave a Reply