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 WTFPLimportdbusimportgobjectimporttimeclassPointyHairedBoss:def__init__(self,boss_id,source,frequency=30):self.boss_id=boss_idself.source=sourceself.frequency=frequencybus=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)printself.boss_imdefstart_nonsense(self):question_list=open(self.source)forqinquestion_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 frequencyo=PointyHairedBoss("foo@gmail.com","questions")o.start_nonsense()