Add object type filtering to iter_resources
This commit is contained in:
parent
63da39e005
commit
bfb3689456
16 changed files with 92 additions and 61 deletions
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
import sys
|
||||
|
||||
from weboob.capabilities.bank import ICapBank
|
||||
from weboob.capabilities.bank import ICapBank, Account, Operation
|
||||
from weboob.tools.application.repl import ReplApplication
|
||||
from weboob.tools.application.formatters.iformatter import IFormatter
|
||||
|
||||
|
|
@ -142,6 +142,7 @@ class Boobank(ReplApplication):
|
|||
'list': 'account_list',
|
||||
'transfer': 'transfer',
|
||||
}
|
||||
COLLECTION_OBJECTS = (Account, Operation, )
|
||||
|
||||
def _complete_account(self, exclude=None):
|
||||
if exclude:
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
from datetime import timedelta
|
||||
import sys
|
||||
|
||||
from weboob.capabilities.bugtracker import ICapBugTracker, Query, Update
|
||||
from weboob.capabilities.bugtracker import ICapBugTracker, Query, Update, Project, Issue
|
||||
from weboob.tools.application.repl import ReplApplication
|
||||
from weboob.tools.application.formatters.iformatter import IFormatter
|
||||
from weboob.tools.misc import html2text
|
||||
|
|
@ -93,6 +93,7 @@ class BoobTracker(ReplApplication):
|
|||
'search': 'issues_list',
|
||||
'ls': 'issues_list',
|
||||
}
|
||||
COLLECTION_OBJECTS = (Project, Issue, )
|
||||
|
||||
def add_application_options(self, group):
|
||||
group.add_option('--author')
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
import sys
|
||||
|
||||
from weboob.capabilities.radio import ICapRadio
|
||||
from weboob.capabilities.radio import ICapRadio, Radio
|
||||
from weboob.capabilities.base import NotLoaded
|
||||
from weboob.tools.application.repl import ReplApplication
|
||||
from weboob.tools.application.media_player import InvalidMediaPlayer, MediaPlayer, MediaPlayerNotFound
|
||||
|
|
@ -66,6 +66,7 @@ class Radioob(ReplApplication):
|
|||
COMMANDS_FORMATTERS = {'ls': 'radio_list',
|
||||
'search': 'radio_list',
|
||||
}
|
||||
COLLECTION_OBJECTS = (Radio, )
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
ReplApplication.__init__(self, *args, **kwargs)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import subprocess
|
|||
import sys
|
||||
import os
|
||||
|
||||
from weboob.capabilities.video import ICapVideo
|
||||
from weboob.capabilities.video import ICapVideo, BaseVideo
|
||||
from weboob.capabilities.base import NotLoaded
|
||||
from weboob.tools.application.repl import ReplApplication
|
||||
from weboob.tools.application.media_player import InvalidMediaPlayer, MediaPlayer, MediaPlayerNotFound
|
||||
|
|
@ -66,6 +66,7 @@ class Videoob(ReplApplication):
|
|||
EXTRA_FORMATTERS = {'video_list': VideoListFormatter}
|
||||
COMMANDS_FORMATTERS = {'search': 'video_list',
|
||||
'ls': 'video_list'}
|
||||
COLLECTION_OBJECTS = (BaseVideo, )
|
||||
|
||||
nsfw = True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue