def __init__(self, server=None): FooApp.__init__(self, server) self.hellaserver = ServerProxy('http://*****:*****@%s:%s/' % (self.data['password'], self.data['server'], self.data['port'])) self.data = FileStore('/tmp/apps/hella') try: self.cache = json.loads(self.data['cache']) except: self.cache = []
def __init__(self, server=None): FooApp.__init__(self, server) self.data = FileStore('/tmp/apps/growl') self.sock = socket(AF_INET, SOCK_DGRAM) p = GrowlRegistrationPacket(application='foobox', password='') p.addNotification('Message', enabled=True) self.sock.sendto(p.payload(), (self.data['target'], GROWL_UDP_PORT))
def __init__(self, server=None): FooApp.__init__(self, server) self.data = FileStore('/tmp/apps/pownce') self.api = pownce.Api(self.data['username'], self.data['password'], self.data['apikey']) try: self.cache = json.loads(self.data['cache']) except: self.cache = []
def recv(self, client, msg): logging.debug('Jabber got message') if not str(msg.getFrom()).startswith(self.data['target']): return if not msg.getBody().startswith('!'): FooApp.recv(self, msg.getBody()) else: prefix, msg = msg.getBody().split(' ', 1) prefix = prefix.lstrip('!') FooApp.recv(self, msg, dst=prefix) return
def __init__(self, server=None): FooApp.__init__(self, server) self.data = FileStore('/tmp/apps/jabber') self.jabberid = self.data['username'] self.password = self.data['password'] jid = xmpp.protocol.JID(self.jabberid) self.client = xmpp.Client(jid.getDomain(), debug=[]) self.client.connect() self.client.auth(jid.getNode(), self.password, resource='script') self.client.RegisterHandler('message', self.recv) self.client.sendInitPresence(requestRoster=0)
def __init__(self, user): FooApp.__init__(self, user) self.searchurl = 'http://www.google.com/sms/demo?hl=en&country=US&q=' try: self.queries = json.loads(self.data['queries']) except: self.queries = [] try: self.cache = json.loads(self.data['cache']) except: self.cache = []
def __init__(self, user): FooApp.__init__(self, user) try: self.numbers = json.loads(self.data['numbers']) except: self.numbers = [] try: self.cache = json.loads(self.data['cache']) except: self.cache = []
def __init__(self, user): FooApp.__init__(self, user) try: self.feeds = json.loads(self.data['feeds']) except: self.feeds = [] try: self.cache = json.loads(self.data['cache']) except: self.cache = {}
def __init__(self, server=None, listen_port=None): FooApp.__init__(self, server) self.data = FileStore('/tmp/apps/alias') self.aliases = {} self.baseurl = 'http://%s:%i' % (getfqdn(), listen_port)
def __init__(self): FooApp.__init__(self) try: self.cache = json.loads(self.data['cache']) except: self.cache = []
def __init__(self, server=None): FooApp.__init__(self, server) self.eliza = eliza()