rename ICap to Cap (closes #1424)
This commit is contained in:
parent
51958135cb
commit
e025fb0b20
49 changed files with 679 additions and 679 deletions
|
|
@ -26,7 +26,7 @@ from decimal import Decimal, InvalidOperation
|
|||
import sys
|
||||
|
||||
from weboob.capabilities.base import empty
|
||||
from weboob.capabilities.bank import ICapBank, Account, Transaction
|
||||
from weboob.capabilities.bank import CapBank, Account, Transaction
|
||||
from weboob.tools.application.repl import ReplApplication, defaultcount
|
||||
from weboob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
|
||||
|
||||
|
|
@ -280,7 +280,7 @@ class Boobank(ReplApplication):
|
|||
APPNAME = 'boobank'
|
||||
VERSION = '0.j'
|
||||
COPYRIGHT = 'Copyright(C) 2010-2011 Romain Bignon, Christophe Benz'
|
||||
CAPS = ICapBank
|
||||
CAPS = CapBank
|
||||
DESCRIPTION = "Console application allowing to list your bank accounts and get their balance, " \
|
||||
"display accounts history and coming bank operations, and transfer money from an account to " \
|
||||
"another (if available)."
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import sys
|
|||
from urlparse import urlsplit
|
||||
from random import choice
|
||||
|
||||
from weboob.capabilities.content import ICapContent
|
||||
from weboob.capabilities.content import CapContent
|
||||
from weboob.tools.application.repl import ReplApplication
|
||||
from weboob.tools.ordereddict import OrderedDict
|
||||
|
||||
|
|
@ -281,7 +281,7 @@ class Boobathon(ReplApplication):
|
|||
COPYRIGHT = 'Copyright(C) 2011 Romain Bignon'
|
||||
DESCRIPTION = 'Console application to participate to a Boobathon.'
|
||||
SHORT_DESCRIPTION = "participate in a Boobathon"
|
||||
CAPS = ICapContent
|
||||
CAPS = CapContent
|
||||
SYNOPSIS = 'Usage: %prog [-dqv] [-b backends] [-cnfs] boobathon\n'
|
||||
SYNOPSIS += ' %prog [--help] [--version]'
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ from datetime import time, datetime
|
|||
from weboob.tools.date import parse_date
|
||||
from weboob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
|
||||
from weboob.capabilities.base import empty
|
||||
from weboob.capabilities.calendar import ICapCalendarEvent, Query, CATEGORIES, BaseCalendarEvent
|
||||
from weboob.capabilities.calendar import CapCalendarEvent, Query, CATEGORIES, BaseCalendarEvent
|
||||
from weboob.tools.application.repl import ReplApplication, defaultcount
|
||||
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ class Boobcoming(ReplApplication):
|
|||
COPYRIGHT = 'Copyright(C) 2012 Bezleputh'
|
||||
DESCRIPTION = "Console application to see upcoming events."
|
||||
SHORT_DESCRIPTION = "see upcoming events"
|
||||
CAPS = ICapCalendarEvent
|
||||
CAPS = CapCalendarEvent
|
||||
EXTRA_FORMATTERS = {'upcoming_list': UpcomingListFormatter,
|
||||
'upcoming': UpcomingFormatter,
|
||||
'simple_upcoming': UpcomingSimpleFormatter,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
import sys
|
||||
from decimal import Decimal
|
||||
|
||||
from weboob.capabilities.bill import ICapBill, Detail, Subscription
|
||||
from weboob.capabilities.bill import CapBill, Detail, Subscription
|
||||
from weboob.tools.application.repl import ReplApplication, defaultcount
|
||||
from weboob.tools.application.formatters.iformatter import PrettyFormatter
|
||||
from weboob.tools.application.base import MoreResultsAvailable
|
||||
|
|
@ -45,7 +45,7 @@ class Boobill(ReplApplication):
|
|||
COPYRIGHT = 'Copyright(C) 2012 Florent Fourcot'
|
||||
DESCRIPTION = 'Console application allowing to get and download bills.'
|
||||
SHORT_DESCRIPTION = "get and download bills"
|
||||
CAPS = ICapBill
|
||||
CAPS = CapBill
|
||||
COLLECTION_OBJECTS = (Subscription, )
|
||||
EXTRA_FORMATTERS = {'subscriptions': SubscriptionsFormatter,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
import sys
|
||||
|
||||
from weboob.capabilities.lyrics import ICapLyrics
|
||||
from weboob.capabilities.lyrics import CapLyrics
|
||||
from weboob.capabilities.base import empty
|
||||
from weboob.tools.application.repl import ReplApplication, defaultcount
|
||||
from weboob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
|
||||
|
|
@ -62,7 +62,7 @@ class Booblyrics(ReplApplication):
|
|||
COPYRIGHT = 'Copyright(C) 2013 Julien Veyssier'
|
||||
DESCRIPTION = "Console application allowing to search for song lyrics on various websites."
|
||||
SHORT_DESCRIPTION = "search and display song lyrics"
|
||||
CAPS = ICapLyrics
|
||||
CAPS = CapLyrics
|
||||
EXTRA_FORMATTERS = {'lyrics_list': LyricsListFormatter,
|
||||
'lyrics_get': LyricsGetFormatter,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ from tempfile import NamedTemporaryFile
|
|||
from lxml import etree
|
||||
|
||||
from weboob.core import CallErrors
|
||||
from weboob.capabilities.messages import ICapMessages, Message, Thread
|
||||
from weboob.capabilities.account import ICapAccount
|
||||
from weboob.capabilities.contact import ICapContact
|
||||
from weboob.capabilities.messages import CapMessages, Message, Thread
|
||||
from weboob.capabilities.account import CapAccount
|
||||
from weboob.capabilities.contact import CapContact
|
||||
from weboob.tools.application.repl import ReplApplication, defaultcount
|
||||
from weboob.tools.application.formatters.iformatter import IFormatter
|
||||
from weboob.tools.misc import html2text
|
||||
|
|
@ -239,7 +239,7 @@ class Boobmsg(ReplApplication):
|
|||
DESCRIPTION = "Console application allowing to send messages on various websites and " \
|
||||
"to display message threads and contents."
|
||||
SHORT_DESCRIPTION = "send and receive message threads"
|
||||
CAPS = ICapMessages
|
||||
CAPS = CapMessages
|
||||
EXTRA_FORMATTERS = {'msglist': MessagesListFormatter,
|
||||
'msg': MessageFormatter,
|
||||
'xhtml': XHtmlFormatter,
|
||||
|
|
@ -262,7 +262,7 @@ class Boobmsg(ReplApplication):
|
|||
type='string', dest='title')
|
||||
|
||||
def load_default_backends(self):
|
||||
self.load_backends(ICapMessages, storage=self.create_storage())
|
||||
self.load_backends(CapMessages, storage=self.create_storage())
|
||||
|
||||
def main(self, argv):
|
||||
self.load_config()
|
||||
|
|
@ -282,7 +282,7 @@ class Boobmsg(ReplApplication):
|
|||
results = {}
|
||||
for backend, field in self.do('get_account_status',
|
||||
backends=backend_name,
|
||||
caps=ICapAccount):
|
||||
caps=CapAccount):
|
||||
if backend.name in results:
|
||||
results[backend.name].append(field)
|
||||
else:
|
||||
|
|
@ -460,7 +460,7 @@ class Boobmsg(ReplApplication):
|
|||
_id, backend_name = self.parse_id(id, unique_backend=True)
|
||||
|
||||
found = 0
|
||||
for backend, contact in self.do('get_contact', _id, backends=backend_name, caps=ICapContact):
|
||||
for backend, contact in self.do('get_contact', _id, backends=backend_name, caps=CapContact):
|
||||
if contact:
|
||||
self.format(contact)
|
||||
found = 1
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from weboob.capabilities.library import ICapBook, Book
|
||||
from weboob.capabilities.library import CapBook, Book
|
||||
from weboob.tools.application.repl import ReplApplication
|
||||
from weboob.tools.application.formatters.iformatter import PrettyFormatter
|
||||
import sys
|
||||
|
|
@ -41,7 +41,7 @@ class Boobooks(ReplApplication):
|
|||
APPNAME = 'boobooks'
|
||||
VERSION = '0.j'
|
||||
COPYRIGHT = 'Copyright(C) 2012 Jeremy Monnet'
|
||||
CAPS = ICapBook
|
||||
CAPS = CapBook
|
||||
DESCRIPTION = "Console application allowing to list your books rented or booked at the library, " \
|
||||
"book and search new ones, get your booking history (if available)."
|
||||
SHORT_DESCRIPTION = "manage rented books"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
|
||||
from weboob.capabilities.base import empty
|
||||
from weboob.capabilities.gauge import ICapGauge, SensorNotFound
|
||||
from weboob.capabilities.gauge import CapGauge, SensorNotFound
|
||||
from weboob.tools.application.repl import ReplApplication
|
||||
from weboob.tools.application.formatters.iformatter import IFormatter
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ class Boobsize(ReplApplication):
|
|||
COPYRIGHT = 'Copyright(C) 2013 Florent Fourcot'
|
||||
DESCRIPTION = "Console application allowing to display various sensors and gauges values."
|
||||
SHORT_DESCRIPTION = "display sensors and gauges values"
|
||||
CAPS = (ICapGauge)
|
||||
CAPS = (CapGauge)
|
||||
DEFAULT_FORMATTER = 'table'
|
||||
EXTRA_FORMATTERS = {'gauge_list': GaugeFormatter, }
|
||||
COMMANDS_FORMATTERS = {'search': 'gauge_list',
|
||||
|
|
@ -123,7 +123,7 @@ class Boobsize(ReplApplication):
|
|||
"""
|
||||
self.change_path([u'gauges'])
|
||||
self.start_format()
|
||||
for backend, gauge in self.do('iter_gauges', pattern or None, caps=ICapGauge):
|
||||
for backend, gauge in self.do('iter_gauges', pattern or None, caps=CapGauge):
|
||||
self.cached_format(gauge)
|
||||
|
||||
def complete_search(self, text, line, *ignored):
|
||||
|
|
@ -141,7 +141,7 @@ class Boobsize(ReplApplication):
|
|||
_id, backend_name = self.parse_id(gauge)
|
||||
|
||||
self.start_format()
|
||||
for backend, sensor in self.do('iter_sensors', _id, pattern=pattern, backends=backend_name, caps=ICapGauge):
|
||||
for backend, sensor in self.do('iter_sensors', _id, pattern=pattern, backends=backend_name, caps=CapGauge):
|
||||
self.format(sensor)
|
||||
|
||||
def do_history(self, line):
|
||||
|
|
@ -154,7 +154,7 @@ class Boobsize(ReplApplication):
|
|||
_id, backend_name = self.parse_id(gauge)
|
||||
|
||||
self.start_format()
|
||||
for backend, measure in self.do('iter_gauge_history', _id, backends=backend_name, caps=ICapGauge):
|
||||
for backend, measure in self.do('iter_gauge_history', _id, backends=backend_name, caps=CapGauge):
|
||||
self.format(measure)
|
||||
|
||||
def complete_last_sensor_measure(self, text, line, *ignored):
|
||||
|
|
@ -172,5 +172,5 @@ class Boobsize(ReplApplication):
|
|||
_id, backend_name = self.parse_id(gauge)
|
||||
|
||||
self.start_format()
|
||||
for backend, measure in self.do('get_last_measure', _id, backends=backend_name, caps=ICapGauge):
|
||||
for backend, measure in self.do('get_last_measure', _id, backends=backend_name, caps=CapGauge):
|
||||
self.format(measure)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import re
|
|||
import unicodedata
|
||||
|
||||
from weboob.capabilities.base import empty, BaseObject
|
||||
from weboob.capabilities.bugtracker import ICapBugTracker, Query, Update, Project, Issue, IssueError
|
||||
from weboob.capabilities.bugtracker import CapBugTracker, Query, Update, Project, Issue, IssueError
|
||||
from weboob.tools.application.repl import ReplApplication, defaultcount
|
||||
from weboob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
|
||||
from weboob.tools.misc import html2text
|
||||
|
|
@ -109,7 +109,7 @@ class BoobTracker(ReplApplication):
|
|||
COPYRIGHT = 'Copyright(C) 2011 Romain Bignon'
|
||||
DESCRIPTION = "Console application allowing to create, edit, view bug tracking issues."
|
||||
SHORT_DESCRIPTION = "manage bug tracking issues"
|
||||
CAPS = ICapBugTracker
|
||||
CAPS = CapBugTracker
|
||||
EXTRA_FORMATTERS = {'issue_info': IssueFormatter,
|
||||
'issues_list': IssuesListFormatter,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ from datetime import datetime
|
|||
|
||||
from weboob.applications.weboorrents.weboorrents import TorrentInfoFormatter, TorrentListFormatter
|
||||
from weboob.applications.suboob.suboob import SubtitleInfoFormatter, SubtitleListFormatter
|
||||
from weboob.capabilities.torrent import ICapTorrent, MagnetOnly
|
||||
from weboob.capabilities.cinema import ICapCinema
|
||||
from weboob.capabilities.subtitle import ICapSubtitle
|
||||
from weboob.capabilities.torrent import CapTorrent, MagnetOnly
|
||||
from weboob.capabilities.cinema import CapCinema
|
||||
from weboob.capabilities.subtitle import CapSubtitle
|
||||
from weboob.capabilities.base import empty
|
||||
from weboob.tools.application.repl import ReplApplication, defaultcount
|
||||
from weboob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
|
||||
|
|
@ -183,7 +183,7 @@ class Cineoob(ReplApplication):
|
|||
", list persons related to a movie, list movies related to a person and list common movies " \
|
||||
"of two persons."
|
||||
SHORT_DESCRIPTION = "search movies and persons around cinema"
|
||||
CAPS = (ICapCinema, ICapTorrent, ICapSubtitle)
|
||||
CAPS = (CapCinema, CapTorrent, CapSubtitle)
|
||||
EXTRA_FORMATTERS = {'movie_list': MovieListFormatter,
|
||||
'movie_info': MovieInfoFormatter,
|
||||
'movie_releases': MovieReleasesFormatter,
|
||||
|
|
@ -229,11 +229,11 @@ class Cineoob(ReplApplication):
|
|||
"""
|
||||
id1, id2 = self.parse_command_args(line, 2, 1)
|
||||
|
||||
person1 = self.get_object(id1, 'get_person', caps=ICapCinema)
|
||||
person1 = self.get_object(id1, 'get_person', caps=CapCinema)
|
||||
if not person1:
|
||||
print >>sys.stderr, 'Person not found: %s' % id1
|
||||
return 3
|
||||
person2 = self.get_object(id2, 'get_person', caps=ICapCinema)
|
||||
person2 = self.get_object(id2, 'get_person', caps=CapCinema)
|
||||
if not person2:
|
||||
print >>sys.stderr, 'Person not found: %s' % id2
|
||||
return 3
|
||||
|
|
@ -242,15 +242,15 @@ class Cineoob(ReplApplication):
|
|||
self.options.count = None
|
||||
|
||||
lid1 = []
|
||||
for backend, id in self.do('iter_person_movies_ids', person1.id, caps=ICapCinema):
|
||||
for backend, id in self.do('iter_person_movies_ids', person1.id, caps=CapCinema):
|
||||
lid1.append(id)
|
||||
lid2 = []
|
||||
for backend, id in self.do('iter_person_movies_ids', person2.id, caps=ICapCinema):
|
||||
for backend, id in self.do('iter_person_movies_ids', person2.id, caps=CapCinema):
|
||||
lid2.append(id)
|
||||
self.options.count = initial_count
|
||||
inter = list(set(lid1) & set(lid2))
|
||||
for common in inter:
|
||||
movie = self.get_object(common, 'get_movie', caps=ICapCinema)
|
||||
movie = self.get_object(common, 'get_movie', caps=CapCinema)
|
||||
if movie:
|
||||
self.cached_format(movie)
|
||||
|
||||
|
|
@ -262,11 +262,11 @@ class Cineoob(ReplApplication):
|
|||
"""
|
||||
id1, id2 = self.parse_command_args(line, 2, 1)
|
||||
|
||||
movie1 = self.get_object(id1, 'get_movie', caps=ICapCinema)
|
||||
movie1 = self.get_object(id1, 'get_movie', caps=CapCinema)
|
||||
if not movie1:
|
||||
print >>sys.stderr, 'Movie not found: %s' % id1
|
||||
return 3
|
||||
movie2 = self.get_object(id2, 'get_movie', caps=ICapCinema)
|
||||
movie2 = self.get_object(id2, 'get_movie', caps=CapCinema)
|
||||
if not movie2:
|
||||
print >>sys.stderr, 'Movie not found: %s' % id2
|
||||
return 3
|
||||
|
|
@ -275,15 +275,15 @@ class Cineoob(ReplApplication):
|
|||
self.options.count = None
|
||||
|
||||
lid1 = []
|
||||
for backend, id in self.do('iter_movie_persons_ids', movie1.id, caps=ICapCinema):
|
||||
for backend, id in self.do('iter_movie_persons_ids', movie1.id, caps=CapCinema):
|
||||
lid1.append(id)
|
||||
lid2 = []
|
||||
for backend, id in self.do('iter_movie_persons_ids', movie2.id, caps=ICapCinema):
|
||||
for backend, id in self.do('iter_movie_persons_ids', movie2.id, caps=CapCinema):
|
||||
lid2.append(id)
|
||||
self.options.count = initial_count
|
||||
inter = list(set(lid1) & set(lid2))
|
||||
for common in inter:
|
||||
person = self.get_object(common, 'get_person', caps=ICapCinema)
|
||||
person = self.get_object(common, 'get_person', caps=CapCinema)
|
||||
self.cached_format(person)
|
||||
|
||||
def do_info_movie(self, id):
|
||||
|
|
@ -292,7 +292,7 @@ class Cineoob(ReplApplication):
|
|||
|
||||
Get information about a movie.
|
||||
"""
|
||||
movie = self.get_object(id, 'get_movie', caps=ICapCinema)
|
||||
movie = self.get_object(id, 'get_movie', caps=CapCinema)
|
||||
|
||||
if not movie:
|
||||
print >>sys.stderr, 'Movie not found: %s' % id
|
||||
|
|
@ -307,7 +307,7 @@ class Cineoob(ReplApplication):
|
|||
|
||||
Get information about a person.
|
||||
"""
|
||||
person = self.get_object(id, 'get_person', caps=ICapCinema)
|
||||
person = self.get_object(id, 'get_person', caps=CapCinema)
|
||||
|
||||
if not person:
|
||||
print >>sys.stderr, 'Person not found: %s' % id
|
||||
|
|
@ -328,7 +328,7 @@ class Cineoob(ReplApplication):
|
|||
pattern = None
|
||||
|
||||
self.start_format(pattern=pattern)
|
||||
for backend, movie in self.do('iter_movies', pattern=pattern, caps=ICapCinema):
|
||||
for backend, movie in self.do('iter_movies', pattern=pattern, caps=CapCinema):
|
||||
self.cached_format(movie)
|
||||
|
||||
@defaultcount(10)
|
||||
|
|
@ -343,7 +343,7 @@ class Cineoob(ReplApplication):
|
|||
pattern = None
|
||||
|
||||
self.start_format(pattern=pattern)
|
||||
for backend, person in self.do('iter_persons', pattern=pattern, caps=ICapCinema):
|
||||
for backend, person in self.do('iter_persons', pattern=pattern, caps=CapCinema):
|
||||
self.cached_format(person)
|
||||
|
||||
def do_casting(self, line):
|
||||
|
|
@ -355,12 +355,12 @@ class Cineoob(ReplApplication):
|
|||
"""
|
||||
movie_id, role = self.parse_command_args(line, 2, 1)
|
||||
|
||||
movie = self.get_object(movie_id, 'get_movie', caps=ICapCinema)
|
||||
movie = self.get_object(movie_id, 'get_movie', caps=CapCinema)
|
||||
if not movie:
|
||||
print >>sys.stderr, 'Movie not found: %s' % id
|
||||
return 3
|
||||
|
||||
for backend, person in self.do('iter_movie_persons', movie.id, role, backends=movie.backend, caps=ICapCinema):
|
||||
for backend, person in self.do('iter_movie_persons', movie.id, role, backends=movie.backend, caps=CapCinema):
|
||||
self.cached_format(person)
|
||||
|
||||
def do_filmography(self, line):
|
||||
|
|
@ -372,12 +372,12 @@ class Cineoob(ReplApplication):
|
|||
"""
|
||||
person_id, role = self.parse_command_args(line, 2, 1)
|
||||
|
||||
person = self.get_object(person_id, 'get_person', caps=ICapCinema)
|
||||
person = self.get_object(person_id, 'get_person', caps=CapCinema)
|
||||
if not person:
|
||||
print >>sys.stderr, 'Person not found: %s' % id
|
||||
return 3
|
||||
|
||||
for backend, movie in self.do('iter_person_movies', person.id, role, backends=person.backend, caps=ICapCinema):
|
||||
for backend, movie in self.do('iter_person_movies', person.id, role, backends=person.backend, caps=CapCinema):
|
||||
self.cached_format(movie)
|
||||
|
||||
def do_biography(self, person_id):
|
||||
|
|
@ -386,7 +386,7 @@ class Cineoob(ReplApplication):
|
|||
|
||||
Show the complete biography of a person.
|
||||
"""
|
||||
person = self.get_object(person_id, 'get_person', ('name', 'biography'), caps=ICapCinema)
|
||||
person = self.get_object(person_id, 'get_person', ('name', 'biography'), caps=CapCinema)
|
||||
if not person:
|
||||
print >>sys.stderr, 'Person not found: %s' % person_id
|
||||
return 3
|
||||
|
|
@ -410,13 +410,13 @@ class Cineoob(ReplApplication):
|
|||
"""
|
||||
id, country = self.parse_command_args(line, 2, 1)
|
||||
|
||||
movie = self.get_object(id, 'get_movie', ('original_title'), caps=ICapCinema)
|
||||
movie = self.get_object(id, 'get_movie', ('original_title'), caps=CapCinema)
|
||||
if not movie:
|
||||
print >>sys.stderr, 'Movie not found: %s' % id
|
||||
return 3
|
||||
|
||||
# i would like to clarify with fillobj but how could i fill the movie AND choose the country ?
|
||||
for backend, release in self.do('get_movie_releases', movie.id, country, caps=ICapCinema, backends=movie.backend):
|
||||
for backend, release in self.do('get_movie_releases', movie.id, country, caps=CapCinema, backends=movie.backend):
|
||||
if not empty(release):
|
||||
movie.all_release_dates = u'%s' % (release)
|
||||
else:
|
||||
|
|
@ -439,7 +439,7 @@ class Cineoob(ReplApplication):
|
|||
Get information about a torrent.
|
||||
"""
|
||||
|
||||
torrent = self.get_object(id, 'get_torrent', caps=ICapTorrent)
|
||||
torrent = self.get_object(id, 'get_torrent', caps=CapTorrent)
|
||||
if not torrent:
|
||||
print >>sys.stderr, 'Torrent not found: %s' % id
|
||||
return 3
|
||||
|
|
@ -470,7 +470,7 @@ class Cineoob(ReplApplication):
|
|||
dest = '%s.torrent' % _id
|
||||
|
||||
try:
|
||||
for backend, buf in self.do('get_torrent_file', _id, backends=backend_name, caps=ICapTorrent):
|
||||
for backend, buf in self.do('get_torrent_file', _id, backends=backend_name, caps=CapTorrent):
|
||||
if buf:
|
||||
if dest == '-':
|
||||
print buf
|
||||
|
|
@ -507,7 +507,7 @@ class Cineoob(ReplApplication):
|
|||
pattern = None
|
||||
|
||||
self.start_format(pattern=pattern)
|
||||
for backend, torrent in self.do('iter_torrents', pattern=pattern, caps=ICapTorrent):
|
||||
for backend, torrent in self.do('iter_torrents', pattern=pattern, caps=CapTorrent):
|
||||
self.cached_format(torrent)
|
||||
|
||||
@defaultcount(10)
|
||||
|
|
@ -517,7 +517,7 @@ class Cineoob(ReplApplication):
|
|||
|
||||
Search torrents of movie_ID.
|
||||
"""
|
||||
movie = self.get_object(id, 'get_movie', ('original_title'), caps=ICapCinema)
|
||||
movie = self.get_object(id, 'get_movie', ('original_title'), caps=CapCinema)
|
||||
if not movie:
|
||||
print >>sys.stderr, 'Movie not found: %s' % id
|
||||
return 3
|
||||
|
|
@ -529,7 +529,7 @@ class Cineoob(ReplApplication):
|
|||
pattern = None
|
||||
|
||||
self.start_format(pattern=pattern)
|
||||
for backend, torrent in self.do('iter_torrents', pattern=pattern, caps=ICapTorrent):
|
||||
for backend, torrent in self.do('iter_torrents', pattern=pattern, caps=CapTorrent):
|
||||
self.cached_format(torrent)
|
||||
|
||||
#================== SUBTITLE ==================
|
||||
|
|
@ -546,7 +546,7 @@ class Cineoob(ReplApplication):
|
|||
Get information about a subtitle.
|
||||
"""
|
||||
|
||||
subtitle = self.get_object(id, 'get_subtitle', caps=ICapCinema)
|
||||
subtitle = self.get_object(id, 'get_subtitle', caps=CapCinema)
|
||||
if not subtitle:
|
||||
print >>sys.stderr, 'Subtitle not found: %s' % id
|
||||
return 3
|
||||
|
|
@ -576,7 +576,7 @@ class Cineoob(ReplApplication):
|
|||
if dest is None:
|
||||
dest = '%s' % _id
|
||||
|
||||
for backend, buf in self.do('get_subtitle_file', _id, backends=backend_name, caps=ICapSubtitle):
|
||||
for backend, buf in self.do('get_subtitle_file', _id, backends=backend_name, caps=CapSubtitle):
|
||||
if buf:
|
||||
if dest == '-':
|
||||
print buf
|
||||
|
|
@ -625,7 +625,7 @@ class Cineoob(ReplApplication):
|
|||
pattern = None
|
||||
|
||||
self.start_format(pattern=pattern)
|
||||
for backend, subtitle in self.do('iter_subtitles', language=language, pattern=pattern, caps=ICapSubtitle):
|
||||
for backend, subtitle in self.do('iter_subtitles', language=language, pattern=pattern, caps=CapSubtitle):
|
||||
self.cached_format(subtitle)
|
||||
|
||||
@defaultcount(10)
|
||||
|
|
@ -656,7 +656,7 @@ class Cineoob(ReplApplication):
|
|||
----------------------
|
||||
"""
|
||||
language, id = self.parse_command_args(line, 2, 2)
|
||||
movie = self.get_object(id, 'get_movie', ('original_title'), caps=ICapCinema)
|
||||
movie = self.get_object(id, 'get_movie', ('original_title'), caps=CapCinema)
|
||||
if not movie:
|
||||
print >>sys.stderr, 'Movie not found: %s' % id
|
||||
return 3
|
||||
|
|
@ -667,5 +667,5 @@ class Cineoob(ReplApplication):
|
|||
pattern = None
|
||||
|
||||
self.start_format(pattern=pattern)
|
||||
for backend, subtitle in self.do('iter_subtitles', language=language, pattern=pattern, caps=ICapSubtitle):
|
||||
for backend, subtitle in self.do('iter_subtitles', language=language, pattern=pattern, caps=CapSubtitle):
|
||||
self.cached_format(subtitle)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
import sys
|
||||
|
||||
from weboob.capabilities.pricecomparison import ICapPriceComparison
|
||||
from weboob.capabilities.pricecomparison import CapPriceComparison
|
||||
from weboob.tools.misc import html2text
|
||||
from weboob.tools.application.repl import ReplApplication
|
||||
from weboob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
|
||||
|
|
@ -88,7 +88,7 @@ class Comparoob(ReplApplication):
|
|||
COMMANDS_FORMATTERS = {'prices': 'prices',
|
||||
'info': 'price',
|
||||
}
|
||||
CAPS = ICapPriceComparison
|
||||
CAPS = CapPriceComparison
|
||||
|
||||
def do_prices(self, pattern):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
import sys
|
||||
import codecs
|
||||
|
||||
from weboob.capabilities.recipe import ICapRecipe
|
||||
from weboob.capabilities.recipe import CapRecipe
|
||||
from weboob.capabilities.base import empty
|
||||
from weboob.tools.application.repl import ReplApplication, defaultcount
|
||||
from weboob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
|
||||
|
|
@ -79,7 +79,7 @@ class Cookboob(ReplApplication):
|
|||
COPYRIGHT = 'Copyright(C) 2013 Julien Veyssier'
|
||||
DESCRIPTION = "Console application allowing to search for recipes on various websites."
|
||||
SHORT_DESCRIPTION = "search and consult recipes"
|
||||
CAPS = ICapRecipe
|
||||
CAPS = CapRecipe
|
||||
EXTRA_FORMATTERS = {'recipe_list': RecipeListFormatter,
|
||||
'recipe_info': RecipeInfoFormatter
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
import sys
|
||||
|
||||
from weboob.capabilities.housing import ICapHousing, Query
|
||||
from weboob.capabilities.housing import CapHousing, Query
|
||||
from weboob.tools.application.repl import ReplApplication, defaultcount
|
||||
from weboob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ class Flatboob(ReplApplication):
|
|||
COPYRIGHT = 'Copyright(C) 2012 Romain Bignon'
|
||||
DESCRIPTION = "Console application to search for housing."
|
||||
SHORT_DESCRIPTION = "search for housing"
|
||||
CAPS = ICapHousing
|
||||
CAPS = CapHousing
|
||||
EXTRA_FORMATTERS = {'housing_list': HousingListFormatter,
|
||||
'housing': HousingFormatter,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ from re import search, sub
|
|||
|
||||
from weboob.tools.application.repl import ReplApplication, defaultcount
|
||||
from weboob.capabilities.base import empty
|
||||
from weboob.capabilities.gallery import ICapGallery, BaseGallery, BaseImage
|
||||
from weboob.capabilities.gallery import CapGallery, BaseGallery, BaseImage
|
||||
from weboob.tools.application.formatters.iformatter import PrettyFormatter
|
||||
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ class Galleroob(ReplApplication):
|
|||
COPYRIGHT = u'Copyright(C) 2011 Noé Rubinstein'
|
||||
DESCRIPTION = 'galleroob browses and downloads web image galleries'
|
||||
SHORT_DESCRIPTION = 'browse and download web image galleries'
|
||||
CAPS = ICapGallery
|
||||
CAPS = CapGallery
|
||||
EXTRA_FORMATTERS = {'gallery_list': GalleryListFormatter}
|
||||
COMMANDS_FORMATTERS = {'search': 'gallery_list', 'ls': 'gallery_list'}
|
||||
COLLECTION_OBJECTS = (BaseGallery, BaseImage, )
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
import sys
|
||||
|
||||
from weboob.capabilities.geolocip import ICapGeolocIp
|
||||
from weboob.capabilities.geolocip import CapGeolocIp
|
||||
from weboob.tools.application.repl import ReplApplication
|
||||
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ class Geolooc(ReplApplication):
|
|||
COPYRIGHT = 'Copyright(C) 2010-2011 Romain Bignon'
|
||||
DESCRIPTION = "Console application allowing to geolocalize IP addresses."
|
||||
SHORT_DESCRIPTION = "geolocalize IP addresses"
|
||||
CAPS = ICapGeolocIp
|
||||
CAPS = CapGeolocIp
|
||||
|
||||
def main(self, argv):
|
||||
if len(argv) < 2:
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
import sys
|
||||
|
||||
from weboob.capabilities.job import ICapJob
|
||||
from weboob.capabilities.job import CapJob
|
||||
from weboob.tools.application.repl import ReplApplication, defaultcount
|
||||
from weboob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ class Handjoob(ReplApplication):
|
|||
COPYRIGHT = 'Copyright(C) 2012 Bezleputh'
|
||||
DESCRIPTION = "Console application to search for a job."
|
||||
SHORT_DESCRIPTION = "search for a job"
|
||||
CAPS = ICapJob
|
||||
CAPS = CapJob
|
||||
EXTRA_FORMATTERS = {'job_advert_list': JobAdvertListFormatter,
|
||||
'job_advert': JobAdvertFormatter,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ from copy import copy
|
|||
from weboob.core import CallErrors
|
||||
from weboob.tools.application.repl import ReplApplication
|
||||
from weboob.applications.boobmsg import Boobmsg
|
||||
from weboob.capabilities.dating import ICapDating, OptimizationNotFound
|
||||
from weboob.capabilities.dating import CapDating, OptimizationNotFound
|
||||
from weboob.tools.application.formatters.iformatter import PrettyFormatter
|
||||
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ class HaveDate(Boobmsg):
|
|||
SHORT_DESCRIPTION = "interact with dating websites"
|
||||
STORAGE_FILENAME = 'dating.storage'
|
||||
STORAGE = {'optims': {}}
|
||||
CAPS = ICapDating
|
||||
CAPS = CapDating
|
||||
EXTRA_FORMATTERS = copy(Boobmsg.EXTRA_FORMATTERS)
|
||||
EXTRA_FORMATTERS['events'] = EventListFormatter
|
||||
COMMANDS_FORMATTERS = copy(Boobmsg.COMMANDS_FORMATTERS)
|
||||
|
|
@ -63,7 +63,7 @@ class HaveDate(Boobmsg):
|
|||
COMMANDS_FORMATTERS['events'] = 'events'
|
||||
|
||||
def load_default_backends(self):
|
||||
self.load_backends(ICapDating, storage=self.create_storage(self.STORAGE_FILENAME))
|
||||
self.load_backends(CapDating, storage=self.create_storage(self.STORAGE_FILENAME))
|
||||
|
||||
def main(self, argv):
|
||||
self.load_config()
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from weboob.capabilities.travel import ICapTravel
|
||||
from weboob.capabilities.travel import CapTravel
|
||||
from weboob.tools.application.base import BaseApplication
|
||||
from logging import warning
|
||||
|
||||
|
|
@ -284,6 +284,6 @@ class Masstransit(BaseApplication):
|
|||
SHORT_DESCRIPTION = "search for train stations and departures"
|
||||
|
||||
def main(self, argv):
|
||||
self.load_backends(ICapTravel)
|
||||
self.load_backends(CapTravel)
|
||||
MasstransitHildon(self.weboob)
|
||||
gtk.main()
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import socket
|
|||
|
||||
from weboob.core import Weboob, CallErrors
|
||||
from weboob.core.scheduler import Scheduler
|
||||
from weboob.capabilities.messages import ICapMessages, ICapMessagesPost, Thread, Message
|
||||
from weboob.capabilities.messages import CapMessages, CapMessagesPost, Thread, Message
|
||||
from weboob.tools.application.repl import ReplApplication
|
||||
from weboob.tools.misc import html2text, get_backtrace, utc2local, to_unicode
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ class Monboob(ReplApplication):
|
|||
'smtp': 'localhost',
|
||||
'pipe': '',
|
||||
'html': 0}
|
||||
CAPS = ICapMessages
|
||||
CAPS = CapMessages
|
||||
DISABLE_REPL = True
|
||||
|
||||
def add_application_options(self, group):
|
||||
|
|
@ -108,7 +108,7 @@ class Monboob(ReplApplication):
|
|||
return Weboob(scheduler=MonboobScheduler(self))
|
||||
|
||||
def load_default_backends(self):
|
||||
self.load_backends(ICapMessages, storage=self.create_storage())
|
||||
self.load_backends(CapMessages, storage=self.create_storage())
|
||||
|
||||
def main(self, argv):
|
||||
self.load_config()
|
||||
|
|
@ -221,8 +221,8 @@ class Monboob(ReplApplication):
|
|||
print >>sys.stderr, 'Backend %s not found' % bname
|
||||
return 1
|
||||
|
||||
if not backend.has_caps(ICapMessagesPost):
|
||||
print >>sys.stderr, 'The backend %s does not implement ICapMessagesPost' % bname
|
||||
if not backend.has_caps(CapMessagesPost):
|
||||
print >>sys.stderr, 'The backend %s does not implement CapMessagesPost' % bname
|
||||
return 1
|
||||
|
||||
thread = Thread(thread_id)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
import sys
|
||||
|
||||
from weboob.capabilities.base import empty
|
||||
from weboob.capabilities.parcel import ICapParcel, Parcel
|
||||
from weboob.capabilities.parcel import CapParcel, Parcel
|
||||
from weboob.tools.application.repl import ReplApplication
|
||||
from weboob.tools.application.formatters.iformatter import IFormatter
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ class Parceloob(ReplApplication):
|
|||
APPNAME = 'parceloob'
|
||||
VERSION = '0.j'
|
||||
COPYRIGHT = 'Copyright(C) 2013 Romain Bignon'
|
||||
CAPS = ICapParcel
|
||||
CAPS = CapParcel
|
||||
DESCRIPTION = "Console application to track your parcels."
|
||||
SHORT_DESCRIPTION = "manage your parcels"
|
||||
EXTRA_FORMATTERS = {'status': StatusFormatter,
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue