From 58b825c46369edd3dc8acd7f110586d8ae2a6f6c Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Fri, 10 Feb 2012 14:07:13 +0100 Subject: [PATCH] remove useless chatoob application --- scripts/chatoob | 27 ---------- weboob/applications/chatoob/__init__.py | 22 -------- weboob/applications/chatoob/chatoob.py | 70 ------------------------- 3 files changed, 119 deletions(-) delete mode 100755 scripts/chatoob delete mode 100644 weboob/applications/chatoob/__init__.py delete mode 100644 weboob/applications/chatoob/chatoob.py diff --git a/scripts/chatoob b/scripts/chatoob deleted file mode 100755 index 4be732ae..00000000 --- a/scripts/chatoob +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# vim: ft=python et softtabstop=4 cinoptions=4 shiftwidth=4 ts=4 ai - -# Copyright(C) 2010-2011 Christophe Benz -# -# This file is part of weboob. -# -# weboob is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# weboob is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with weboob. If not, see . - - -from weboob.applications.chatoob import Chatoob - - -if __name__ == '__main__': - Chatoob.run() diff --git a/weboob/applications/chatoob/__init__.py b/weboob/applications/chatoob/__init__.py deleted file mode 100644 index ae4b8fc6..00000000 --- a/weboob/applications/chatoob/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright(C) 2010-2011 Christophe Benz -# -# This file is part of weboob. -# -# weboob is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# weboob is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with weboob. If not, see . - -from .chatoob import Chatoob - -__all__ = ['Chatoob'] diff --git a/weboob/applications/chatoob/chatoob.py b/weboob/applications/chatoob/chatoob.py deleted file mode 100644 index ba6407ca..00000000 --- a/weboob/applications/chatoob/chatoob.py +++ /dev/null @@ -1,70 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright(C) 2010-2011 Christophe Benz -# -# This file is part of weboob. -# -# weboob is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# weboob is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with weboob. If not, see . - - -import logging - -from weboob.tools.application.repl import ReplApplication -from weboob.capabilities.chat import ICapChat -from weboob.capabilities.contact import ICapContact, Contact - - -__all__ = ['Chatoob'] - - -class Chatoob(ReplApplication): - APPNAME = 'chatoob' - VERSION = '0.b' - COPYRIGHT = 'Copyright(C) 2010-2011 Christophe Benz' - DESCRIPTION = 'Console application allowing to chat with contacts on various websites.' - CAPS = ICapChat - - def on_new_chat_message(self, message): - print 'on_new_chat_message: %s' % message - - def do_list(self, line): - """ - list - - List all contacts. - """ - for backend, contact in self.do('iter_contacts', status=Contact.STATUS_ONLINE, caps=ICapContact): - self.format(contact) - self.flush() - - def do_messages(self, line): - """ - messages - - Get messages. - """ - for backend, message in self.do('iter_chat_messages'): - self.format(message) - self.flush() - - def do_send(self, line): - """ - send CONTACT MESSAGE - - Send a message to the specified contact. - """ - _id, message = self.parse_command_args(line, 2, 2) - for backend, result in self.do('send_chat_message', _id, message): - if not result: - logging.error(u'Failed to send message to contact id="%s" on backend "%s"' % (_id, backend.name))