On a whim I started looking at the advanced notification panel in Skype (Options, Notifications, Advanced View) and found out that we can run a script on events. Wow, that means we can get the details of a Skype event over the command line into any interpreted or compiled program.
My first attempt has been a very simple bash script (I’m on Linux)
echo $* >> skype.log
The name of the script must be typed in into the box in the options panel with some parameter variables. There is little documentation about them but after a little googling and a look at the output of strings /usr/bin/skype | egrep ‘^%’ I got this list: %type, %sskype, %sname, %fpath, %fname, %fsize, %fprogress, %fspeed, %smessage.
I’m calling my script as log-skype %type %sskype %sname %smessage and it’s still very simple:
echo “`date +’%Y-%m-%d %H:%M:%S’`” $* | sed ‘s/ %smessage$//’ >> ~/skype.log
The sed is to remove %smessage from the lines about the events that don’t have a text message.
This lets me build a plain text log of all my messages. Unfortunately it seems there isn’t a variable with the name of the conversation but that’s not a problem.
The next step could be integrating the events with the dbus but there are already other web pages about that.
If you want to inspect Skype’s message databases you might also be interested in Skyperious.