More scripting Skype: Moods to Twitter and command-line file transfer
I have blogged before about how using the Skype4Py library makes it very easy to script Skype and add little features to it, in a portable way. I have written two such little scripts recently. Their code is short and simple, and while I only tested them under Linux they should also work under Windows and Mac. They can be found with my Skype tools.
The first script will send your own mood messages to Twitter. There are two reasons for doing that. First many people use the mood message like Twitter, to say what they think or as a micro-blogging tool. So the mood message can be a very good “Twitter editor”. The second reason is that Skype doesn’t keep an history of your mood messages. This provides such an history, which can be private if you set your Twitter privacy settings accordingly.
The second script is to make my life easier. Under Linux I’m often in the command-line and I often have to send some file to colleagues. Currently that requires to get to the Skype UI, find the contact, choose the Send file option and navigate to the directory where my file to send is, lots of clicks.
So I’ve written the little send_file.py script. Just specify the Skype name(s) or the display name(s) of the people you want to send the file too, and it will open the file selection window to the current directory. From there you just have to choose the file to send. Why not specify directly the file name to transfer on the command-line? The Skype API doesn’t allow this, to prevent external applications to transfer files without the knowledge of the user. Yet despite this limitation, the script makes the file transfer operation much faster.
Note that “send_file.py John” will be enough to send the file to all contacts that have John in their name. Under Linux, this script requires at least Skype 2.0.0.27.
Vincent Oberle’s blog
