new system to load backends

Now there is a single file ~/.weboob/backends, where every backends are
instancied. There are two ways to create backends for frontends:
- Use Weboob.load_backends(), to load every backends in the config file
- Use Weboob.load_modules(), to instanciate every module one time
This commit is contained in:
Romain Bignon 2010-04-01 20:01:01 +02:00
commit e119a70cec
9 changed files with 102 additions and 28 deletions

View file

@ -22,6 +22,7 @@ from weboob.backend import Backend
from weboob.capabilities.messages import ICapMessages, ICapMessagesReply
class AuMBackend(Backend, ICapMessages, ICapMessagesReply):
NAME = 'aum'
MAINTAINER = 'Romain Bignon'
EMAIL = 'romain@peerfuse.org'
VERSION = '1.0'

View file

@ -24,6 +24,7 @@ from weboob.capabilities.travel import ICapTravel, Station, Departure
from .browser import CanalTP
class CanalTPBackend(Backend, ICapTravel):
NAME = 'canaltp'
MAINTAINER = 'Romain Bignon'
EMAIL = 'romain@peerfuse.org'
VERSION = '1.0'

View file

@ -24,10 +24,14 @@ from weboob.capabilities.updatable import ICapUpdatable
from feeds import ArticlesList
class DLFPBackend(Backend, ICapMessages, ICapMessagesReply, ICapUpdatable):
NAME = 'dlfp'
MAINTAINER = 'Romain Bignon'
EMAIL = 'romain@peerfuse.org'
VERSION = '1.0'
LICENSE = 'GPLv3'
CONFIG = {'username': Backend.ConfigField(description='Username on website'),
'password': Backend.ConfigField(description='Password of account', is_masked=True)
}
def iter_messages(self):
articles_list = ArticlesList('newspaper')

View file

@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from logging import warning
import feedparser
import re
import datetime
from datetime import datetime
class Article:
RSS = None

View file

@ -25,6 +25,7 @@ from .browser import Transilien
from .stations import STATIONS
class TransilienBackend(Backend, ICapTravel):
NAME = 'transilien'
MAINTAINER = u'Julien Hébert'
EMAIL = 'juke@free.fr'
VERSION = '1.0'