Give your boss the illusion of managing you… with pidgin and dbus
Oh yeah!. With the power of DBus and libpurple APIs it is possible to give your boss the illusion of managing you. Just run the following script (under WTFPL). Tested with jabber accounts in a live office environment :P.
#!/usr/bin/env python # By Sudharshan S, released under WTFPL import dbus import gobject import time class PointyHairedBoss: def __init__(self, boss_id, source, frequency=30): self.boss_id = boss_id self.source = source self.frequency = frequency bus = dbus.SessionBus() _pidgin_proxy = bus.get_object("im.pidgin.purple.PurpleService", \ "/im/pidgin/purple/PurpleObject") self.purple = dbus.Interface (_pidgin_proxy, "im.pidgin.purple.PurpleService") # FIXME: account_id = self.purple.PurpleAccountsGetAllActive()[0] self.boss_conversation = self.purple.PurpleConversationNew(1, account_id, self.boss_id) self.boss_im = self.purple.PurpleConvIm(self.boss_conversation) print self.boss_im def start_nonsense(self): question_list = open(self.source) for q in question_list: self.purple.PurpleConvImSend(self.boss_im, q) time.sleep(self.frequency) if __name__ == "__main__": # Change the jabber id and the path to your questions, with an optional frequency o = PointyHairedBoss("foo@gmail.com", "questions") o.start_nonsense()



LOL

But you should have made the boss as a script returning a YES/NO answer
Miky
31 Jul 09 at 11:11 am
[...] Give your boss the illusion of managing you… with pidgin and dbus at Codelog codelog.blogial.com/2009/07/05/give-your-boss-the-illusion-of-managing-you-with-pidgin-and-dbus – view page – cached foreach(Snippet aSnippet in CodeLog){ aSnippet.GetSolution(); } [...]
Twitter Trackbacks for Give your boss the illusion of managing you… with pidgin and dbus at Codelog [blogial.com] on Topsy.com
10 Nov 09 at 3:00 am