diff --git a/weboob/frontends/http/__init__.py b/weboob/frontends/http/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/weboob/frontends/http/application.py b/weboob/frontends/http/application.py deleted file mode 100644 index f2fac593..00000000 --- a/weboob/frontends/http/application.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright(C) 2010 Christophe Benz - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, version 3 of the License. - -This program 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 General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -""" - -import os - -from mako.lookup import TemplateLookup -import wee -from wsgiref.simple_server import make_server - -from weboob.capabilities.messages import ICapMessages -from weboob.tools.application import BaseApplication - -class HTTPApplication(BaseApplication): - APPNAME = 'http' - CONFIG = dict(host='localhost', port=8080) - - template_lookup = TemplateLookup(directories=['%s/templates' % os.path.dirname(__file__)], - output_encoding='utf-8', encoding_errors='replace') - - - def main(self, argv): - self.load_config() - self.weboob.load_backends() - self.srv = make_server(self.config.get('host'), self.config.get('port'), wee.make_app()) - self.srv.serve_forever() - - @wee.get('/') - def index(self, request): - template = self.template_lookup.get_template('index.mako') - return template.render().strip() - - @wee.get('/messages') - def messages(self, request): - template = self.template_lookup.get_template('messages.mako') - backends = list(self.weboob.iter_backends(ICapMessages)) - return template.render(backends=backends).strip() diff --git a/weboob/frontends/http/templates/base.mako b/weboob/frontends/http/templates/base.mako deleted file mode 100644 index 0372ecad..00000000 --- a/weboob/frontends/http/templates/base.mako +++ /dev/null @@ -1,16 +0,0 @@ -## -*- coding: utf-8 -*- - -<%def name="title()" filter="trim"> -weboob -%def> - - - -
-${message.get_content()[:80]}
-