The new woob repository is here: https://gitlab.com/woob/woob. This gitlab will be removed soon.

Commit d11cbf4f authored by Roger Philibert's avatar Roger Philibert Committed by Vincent A

woob: make "woob" the main import

parent 51348f7a
# -*- coding: utf-8 -*-
from datetime import datetime
import pkgutil
# Copyright(C) 2010-2021 Romain Bignon
#
# This file is part of woob.
#
# woob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# woob 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 Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with woob. If not, see <http://www.gnu.org/licenses/>.
__path__ = pkgutil.extend_path(__path__, __name__)
import woob
__title__ = 'woob'
__version__ = '2.1'
__author__ = 'The Woob Association'
__copyright__ = 'Copyright(C) 2010-%s The Woob Team' % datetime.today().year
__path__ = woob.__path__
__title__ = woob.__title__
__version__ = woob.__version__
__author__ = woob.__author__
__copyright__ = woob.__copyright__
# -*- coding: utf-8 -*-
# Copyright(C) 2010-2021 Romain Bignon
#
# This file is part of woob.
#
# woob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# woob 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 Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with woob. If not, see <http://www.gnu.org/licenses/>.
from datetime import datetime
import pkgutil
import weboob
__path__ = pkgutil.extend_path(__path__, __name__)
__path__ = weboob.__path__
__title__ = weboob.__title__
__version__ = weboob.__version__
__author__ = weboob.__author__
__copyright__ = weboob.__copyright__
__title__ = 'woob'
__version__ = '2.1'
__author__ = 'The Woob Association'
__copyright__ = 'Copyright(C) 2010-%s The Woob Team' % datetime.today().year
......@@ -18,10 +18,10 @@
# along with woob. If not, see <http://www.gnu.org/licenses/>.
from weboob.capabilities.base import empty
from weboob.capabilities.bands import CapBands
from weboob.tools.application.repl import ReplApplication, defaultcount
from weboob.tools.application.formatters.iformatter import PrettyFormatter
from woob.capabilities.base import empty
from woob.capabilities.bands import CapBands
from woob.tools.application.repl import ReplApplication, defaultcount
from woob.tools.application.formatters.iformatter import PrettyFormatter
__all__ = ['Appbands', 'BandInfoFormatter', 'BandListFormatter', 'FavoritesFormatter']
......
......@@ -26,30 +26,30 @@
from dateutil.parser import parse as parse_date
from decimal import Decimal, InvalidOperation
from weboob.browser.browsers import APIBrowser
from weboob.browser.profiles import Woob
from weboob.exceptions import (
from woob.browser.browsers import APIBrowser
from woob.browser.profiles import Woob
from woob.exceptions import (
BrowserHTTPError, CaptchaQuestion, DecoupledValidation,
AppValidationCancelled, AppValidationExpired,
)
from weboob.core.bcall import CallErrors
from weboob.capabilities.base import empty, find_object
from weboob.capabilities.bank import (
from woob.core.bcall import CallErrors
from woob.capabilities.base import empty, find_object
from woob.capabilities.bank import (
Account, Transaction,
Transfer, TransferStep, Recipient, AddRecipientStep,
CapBank, CapTransfer,
TransferInvalidLabel, TransferInvalidAmount, TransferInvalidDate,
TransferInvalidEmitter, TransferInvalidRecipient,
)
from weboob.capabilities.wealth import CapBankWealth
from weboob.capabilities.captcha import exception_to_job
from weboob.capabilities.profile import CapProfile
from weboob.tools.application.repl import ReplApplication, defaultcount
from weboob.tools.application.captcha import CaptchaMixin
from weboob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
from weboob.tools.compat import getproxies
from weboob.tools.log import getLogger
from weboob.tools.misc import to_unicode
from woob.capabilities.wealth import CapBankWealth
from woob.capabilities.captcha import exception_to_job
from woob.capabilities.profile import CapProfile
from woob.tools.application.repl import ReplApplication, defaultcount
from woob.tools.application.captcha import CaptchaMixin
from woob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
from woob.tools.compat import getproxies
from woob.tools.log import getLogger
from woob.tools.misc import to_unicode
__all__ = ['Appbank']
......
......@@ -22,15 +22,15 @@
from decimal import Decimal
import sys
from weboob.capabilities.bill import CapDocument, Detail, Subscription
from weboob.capabilities.profile import CapProfile
from weboob.tools.application.repl import ReplApplication, defaultcount
from weboob.tools.application.formatters.iformatter import PrettyFormatter
from weboob.tools.application.base import MoreResultsAvailable
from weboob.tools.application.captcha import CaptchaMixin
from weboob.core import CallErrors
from weboob.exceptions import CaptchaQuestion
from weboob.capabilities.captcha import exception_to_job
from woob.capabilities.bill import CapDocument, Detail, Subscription
from woob.capabilities.profile import CapProfile
from woob.tools.application.repl import ReplApplication, defaultcount
from woob.tools.application.formatters.iformatter import PrettyFormatter
from woob.tools.application.base import MoreResultsAvailable
from woob.tools.application.captcha import CaptchaMixin
from woob.core import CallErrors
from woob.exceptions import CaptchaQuestion
from woob.capabilities.captcha import exception_to_job
__all__ = ['AppBill']
......
......@@ -19,9 +19,9 @@
from __future__ import print_function
from weboob.capabilities.library import CapBook, Book
from weboob.tools.application.repl import ReplApplication
from weboob.tools.application.formatters.iformatter import PrettyFormatter
from woob.capabilities.library import CapBook, Book
from woob.tools.application.repl import ReplApplication
from woob.tools.application.formatters.iformatter import PrettyFormatter
__all__ = ['AppBooks']
......
......@@ -28,13 +28,13 @@
import re
import unicodedata
from weboob.capabilities.base import empty, BaseObject
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.compat import basestring, unicode
from weboob.tools.html import html2text
from weboob.tools.date import parse_french_date
from woob.capabilities.base import empty, BaseObject
from woob.capabilities.bugtracker import CapBugTracker, Query, Update, Project, Issue, IssueError
from woob.tools.application.repl import ReplApplication, defaultcount
from woob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
from woob.tools.compat import basestring, unicode
from woob.tools.html import html2text
from woob.tools.date import parse_french_date
__all__ = ['AppBugTracker']
......
......@@ -22,12 +22,12 @@
from datetime import time, datetime
from dateutil import tz
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 CapCalendarEvent, Query, CATEGORIES, BaseCalendarEvent, TICKET, STATUS
from weboob.tools.application.repl import ReplApplication, defaultcount
from weboob.tools.config.yamlconfig import YamlConfig
from woob.tools.date import parse_date
from woob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
from woob.capabilities.base import empty
from woob.capabilities.calendar import CapCalendarEvent, Query, CATEGORIES, BaseCalendarEvent, TICKET, STATUS
from woob.tools.application.repl import ReplApplication, defaultcount
from woob.tools.config.yamlconfig import YamlConfig
__all__ = ['AppCalendar']
......
......@@ -21,15 +21,15 @@
from datetime import datetime
from weboob.applications.torrent.torrent import TorrentInfoFormatter, TorrentListFormatter
from weboob.applications.subtitles.subtitles import SubtitleInfoFormatter, SubtitleListFormatter
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, NotAvailable
from weboob.tools.application.repl import ReplApplication, defaultcount
from weboob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
from weboob.core import CallErrors
from woob.applications.torrent.torrent import TorrentInfoFormatter, TorrentListFormatter
from woob.applications.subtitles.subtitles import SubtitleInfoFormatter, SubtitleListFormatter
from woob.capabilities.torrent import CapTorrent, MagnetOnly
from woob.capabilities.cinema import CapCinema
from woob.capabilities.subtitle import CapSubtitle
from woob.capabilities.base import empty, NotAvailable
from woob.tools.application.repl import ReplApplication, defaultcount
from woob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
from woob.core import CallErrors
__all__ = ['AppCinema']
......
......@@ -19,7 +19,7 @@
from __future__ import print_function
from weboob.tools.application.repl import ReplApplication
from woob.tools.application.repl import ReplApplication
__all__ = ['AppCli']
......
......@@ -22,11 +22,11 @@
import os
from collections import OrderedDict
from weboob.capabilities.account import CapAccount
from weboob.exceptions import ModuleLoadError
from weboob.tools.application.repl import ReplApplication
from weboob.tools.application.console import ConsoleProgress
from weboob.tools.application.formatters.iformatter import IFormatter
from woob.capabilities.account import CapAccount
from woob.exceptions import ModuleLoadError
from woob.tools.application.repl import ReplApplication
from woob.tools.application.console import ConsoleProgress
from woob.tools.application.formatters.iformatter import IFormatter
__all__ = ['AppConfig']
......
......@@ -25,9 +25,9 @@
import subprocess
from shutil import which
from weboob.core.bcall import CallErrors
from weboob.capabilities.content import CapContent, Revision, Content
from weboob.tools.application.repl import ReplApplication, defaultcount
from woob.core.bcall import CallErrors
from woob.capabilities.content import CapContent, Revision, Content
from woob.tools.application.repl import ReplApplication, defaultcount
__all__ = ['AppContentEdit']
......
......@@ -21,11 +21,11 @@
from copy import copy
from weboob.core import CallErrors
from weboob.tools.application.repl import ReplApplication
from weboob.applications.msg import AppMsg
from weboob.capabilities.dating import CapDating, OptimizationNotFound
from weboob.tools.application.formatters.iformatter import PrettyFormatter
from woob.core import CallErrors
from woob.tools.application.repl import ReplApplication
from woob.applications.msg import AppMsg
from woob.capabilities.dating import CapDating, OptimizationNotFound
from woob.tools.application.formatters.iformatter import PrettyFormatter
__all__ = ['AppDating']
......
......@@ -21,8 +21,8 @@
from optparse import OptionGroup
from weboob.tools.application.base import Application
from weboob.browser.elements import generate_table_element
from woob.tools.application.base import Application
from woob.browser.elements import generate_table_element
class AppDebug(Application):
......
......@@ -22,10 +22,10 @@
import os
from re import search, sub
from weboob.tools.application.repl import ReplApplication, defaultcount
from weboob.capabilities.base import empty
from weboob.capabilities.gallery import CapGallery, BaseGallery, BaseImage
from weboob.tools.application.formatters.iformatter import PrettyFormatter
from woob.tools.application.repl import ReplApplication, defaultcount
from woob.capabilities.base import empty
from woob.capabilities.gallery import CapGallery, BaseGallery, BaseImage
from woob.tools.application.formatters.iformatter import PrettyFormatter
__all__ = ['AppGallery']
......
......@@ -19,11 +19,11 @@
from __future__ import print_function
from weboob.capabilities.base import empty
from weboob.capabilities.gauge import CapGauge, SensorNotFound
from weboob.tools.application.repl import ReplApplication
from weboob.tools.application.formatters.iformatter import IFormatter
from weboob.tools.compat import unicode
from woob.capabilities.base import empty
from woob.capabilities.gauge import CapGauge, SensorNotFound
from woob.tools.application.repl import ReplApplication
from woob.tools.application.formatters.iformatter import IFormatter
from woob.tools.compat import unicode
__all__ = ['AppGauge']
......
......@@ -19,8 +19,8 @@
from __future__ import print_function
from weboob.capabilities.geolocip import CapGeolocIp
from weboob.tools.application.repl import ReplApplication
from woob.capabilities.geolocip import CapGeolocIp
from woob.tools.application.repl import ReplApplication
__all__ = ['AppGeolocIP']
......
......@@ -19,12 +19,12 @@
from __future__ import print_function
from weboob.capabilities.housing import (CapHousing, Query, POSTS_TYPES,
from woob.capabilities.housing import (CapHousing, Query, POSTS_TYPES,
ADVERT_TYPES, HOUSE_TYPES)
from weboob.capabilities.base import empty
from weboob.tools.application.repl import ReplApplication, defaultcount
from weboob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
from weboob.tools.config.yamlconfig import YamlConfig
from woob.capabilities.base import empty
from woob.tools.application.repl import ReplApplication, defaultcount
from woob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
from woob.tools.config.yamlconfig import YamlConfig
__all__ = ['AppHousing']
......
......@@ -19,9 +19,9 @@
from __future__ import print_function
from weboob.capabilities.job import CapJob
from weboob.tools.application.repl import ReplApplication, defaultcount
from weboob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
from woob.capabilities.job import CapJob
from woob.tools.application.repl import ReplApplication, defaultcount
from woob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
__all__ = ['AppJob']
......
......@@ -19,10 +19,10 @@
from __future__ import print_function
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
from woob.capabilities.lyrics import CapLyrics
from woob.capabilities.base import empty
from woob.tools.application.repl import ReplApplication, defaultcount
from woob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
__all__ = ['AppLyrics', 'LyricsGetFormatter', 'LyricsListFormatter']
......
......@@ -41,11 +41,11 @@
import shutil
from colorama import init, Fore, Style
from weboob.tools.compat import unicode
from weboob.capabilities.bank import AccountType
from weboob.applications.bank import Appbank
from weboob.applications.bank.bank import OfxFormatter
from weboob.tools.application.formatters.simple import SimpleFormatter
from woob.tools.compat import unicode
from woob.capabilities.bank import AccountType
from woob.applications.bank import Appbank
from woob.applications.bank.bank import OfxFormatter
from woob.tools.application.formatters.simple import SimpleFormatter
__all__ = ['AppMoney']
......
......@@ -26,14 +26,14 @@
from tempfile import NamedTemporaryFile
from lxml import etree
from weboob.core import CallErrors
from weboob.capabilities.base import empty
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.html import html2text
from woob.core import CallErrors
from woob.capabilities.base import empty
from woob.capabilities.messages import CapMessages, Message, Thread
from woob.capabilities.account import CapAccount
from woob.capabilities.contact import CapContact
from woob.tools.application.repl import ReplApplication, defaultcount
from woob.tools.application.formatters.iformatter import IFormatter
from woob.tools.html import html2text
__all__ = ['AppMsg']
......
......@@ -19,11 +19,11 @@
from __future__ import print_function
from weboob.capabilities.base import empty
from weboob.capabilities.parcel import CapParcel, Parcel, ParcelNotFound
from weboob.core import CallErrors
from weboob.tools.application.repl import ReplApplication
from weboob.tools.application.formatters.iformatter import IFormatter
from woob.capabilities.base import empty
from woob.capabilities.parcel import CapParcel, Parcel, ParcelNotFound
from woob.core import CallErrors
from woob.tools.application.repl import ReplApplication
from woob.tools.application.formatters.iformatter import IFormatter
__all__ = ['AppParcel']
......
......@@ -26,8 +26,8 @@
from random import choice
import sys
from weboob.capabilities.paste import CapPaste, PasteNotFound
from weboob.tools.application.repl import ReplApplication
from woob.capabilities.paste import CapPaste, PasteNotFound
from woob.tools.application.repl import ReplApplication
__all__ = ['AppPaste']
......
......@@ -19,12 +19,12 @@
from __future__ import print_function
from weboob.capabilities.pricecomparison import CapPriceComparison
from weboob.tools.html import html2text
from weboob.tools.application.repl import ReplApplication, defaultcount
from weboob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
from weboob.tools.application.base import MoreResultsAvailable
from weboob.tools.application.console import ConsoleApplication
from woob.capabilities.pricecomparison import CapPriceComparison
from woob.tools.html import html2text
from woob.tools.application.repl import ReplApplication, defaultcount
from woob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
from woob.tools.application.base import MoreResultsAvailable
from woob.tools.application.console import ConsoleApplication
__all__ = ['AppPriceCompare']
......
......@@ -26,12 +26,12 @@
import requests
from weboob.capabilities.radio import CapRadio, Radio
from weboob.capabilities.audio import CapAudio, BaseAudio, Playlist, Album
from weboob.capabilities.base import empty
from weboob.tools.application.repl import ReplApplication, defaultcount
from weboob.tools.application.media_player import InvalidMediaPlayer, MediaPlayer, MediaPlayerNotFound
from weboob.tools.application.formatters.iformatter import PrettyFormatter
from woob.capabilities.radio import CapRadio, Radio
from woob.capabilities.audio import CapAudio, BaseAudio, Playlist, Album
from woob.capabilities.base import empty
from woob.tools.application.repl import ReplApplication, defaultcount
from woob.tools.application.media_player import InvalidMediaPlayer, MediaPlayer, MediaPlayerNotFound
from woob.tools.application.formatters.iformatter import PrettyFormatter
__all__ = ['AppRadio']
......
......@@ -21,11 +21,11 @@
import codecs
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
from weboob.tools.capabilities.recipe import recipe_to_krecipes_xml
from woob.capabilities.recipe import CapRecipe
from woob.capabilities.base import empty
from woob.tools.application.repl import ReplApplication, defaultcount
from woob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
from woob.tools.capabilities.recipe import recipe_to_krecipes_xml
__all__ = ['AppRecipes']
......
......@@ -28,10 +28,10 @@
from copy import copy
from contextlib import closing
from weboob.core.repositories import Repository
from woob.core.repositories import Repository
from weboob.tools.application.repl import ReplApplication
from weboob.tools.misc import find_exe
from woob.tools.application.repl import ReplApplication
from woob.tools.misc import find_exe
__all__ = ['AppWoobRepos']
......
......@@ -18,8 +18,8 @@
# along with woob. If not, see <http://www.gnu.org/licenses/>.
from weboob.capabilities.rpg import CapRPG, Character, Skill, CharacterClass, CollectableItem
from weboob.tools.application.repl import ReplApplication, defaultcount
from woob.capabilities.rpg import CapRPG, Character, Skill, CharacterClass, CollectableItem
from woob.tools.application.repl import ReplApplication, defaultcount
class AppRPG(ReplApplication):
......
......@@ -21,10 +21,10 @@
from decimal import Decimal
from weboob.capabilities.base import empty
from weboob.capabilities.shop import CapShop, Order, Item
from weboob.tools.application.repl import ReplApplication, defaultcount
from weboob.tools.application.formatters.iformatter import IFormatter
from woob.capabilities.base import empty
from woob.capabilities.shop import CapShop, Order, Item
from woob.tools.application.repl import ReplApplication, defaultcount
from woob.tools.application.formatters.iformatter import IFormatter
__all__ = ['AppShop']
......