예제 #1
0
파일: notifier.py 프로젝트: ldotlopez/zizi
    def notify(self, profile = None, msg = None, detail = None, sender = None, settings = None):
        if not profile:
            profile = settings.get('defaults', 'profile', fallback = None)

        try:
            self._app.run(profile, status = msg)
        except Exception as e:
            get_logger().warning('Cannot notify: %s' % e)
예제 #2
0
 def __init__(self):
     self._logger = get_logger('notifications')
     self._manager = NotifiersMng(
         paths=[join(get_toplevel_dir(), 'zizi', 'apps')],
         logger=self._logger
     )
     self._manager.add_addon('null', NullNotifier)
     self._manager.add_addon('none', NullNotifier)
     self._manager.add_addon('basic', BasicNotifier)
     self._notifiers = dict()
예제 #3
0
파일: app.py 프로젝트: ldotlopez/zizi
 def __init__(self,
              logger=get_logger('torrentspider'),
              fetcher=Fetcher(),
              cachebag=CacheBag(
                  delta=60 * 60,
                  basedir=join(get_cache_path('torrentspider', 'bag')))
              ):
     self._logger = logger
     self._fetcher = fetcher
     self._cachebag = cachebag
예제 #4
0
파일: app.py 프로젝트: ldotlopez/zizi
    def __init__(self):
        bottle.debug(True)
        bottle.TEMPLATE_PATH = join(dirname(abspath(__file__)), 'views'),

        bottle.route('/')(self.index)
        bottle.route('/static/<filename>')(self.send_static)
        bottle.route('/search', method='get')(self.search)
        bottle.route('/queue', method='post')(self.queue)

        self._logger = get_logger('tita')
        self._sess = create_session(dbpath=dbpath)
        self._bypass = BypassApp()
예제 #5
0
 def __init__(self, *args, **kwargs):
     self._logger = get_logger('NotifiersMng')
     super(NotifiersMng, self).__init__(*args, **kwargs)
예제 #6
0
파일: pkgmng.py 프로젝트: ldotlopez/zizi
    def __init__(self, paths=[], logger=get_logger('PkgMng')):
        if not all(map(isabs, paths)):
            raise Exception("All paths must be absolute paths")

        self._paths = paths
        self._addons = None
예제 #7
0
파일: app.py 프로젝트: ldotlopez/zizi
 def __init__(self, logger = get_logger('torrentfeedgenerator')):
     self._logger = logger
예제 #8
0
 def __init__(self, logger=get_logger('spanishtracker'), **options):
     self._logger = logger
     self._options = {
         'magnet_pattern': r"magnet:?xt=urn:btih:{0[hash_string]}&dn={0[name]}&tr=http%3A%2F%2Fwww.spanishtracker.com%3A2710%2Fannounce&tr=http%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=http%3A%2F%2Ftracker.publicbt.com%3A80%2Fannounce&tr=http%3A%2F%2Ftpb.tracker.prq.to%3A80%2Fannounce&tr=http%3A%2F%2Ftracker.prq.to%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A6969",
     }
     self._options.update(options)
예제 #9
0
파일: app.py 프로젝트: ldotlopez/zizi
 def __init__(self, logger=get_logger('classifier')):
     self._logger = logger
     self._pluginmng = PluginManager()
     self._dry_run = False