refactoring: rename sat_frontends to libervia.frontends
This commit is contained in:
parent
91f6b77b3d
commit
4ab9bd7bc8
87 changed files with 162 additions and 162 deletions
|
|
@ -25,7 +25,7 @@ from twisted.internet import reactor, defer
|
|||
from twisted.internet.error import ConnectionRefusedError, ConnectError
|
||||
from libervia.backend.core import exceptions
|
||||
from libervia.backend.tools import config
|
||||
from sat_frontends.bridge.bridge_frontend import BridgeException
|
||||
from libervia.frontends.bridge.bridge_frontend import BridgeException
|
||||
|
||||
log = getLogger(__name__)
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ from wokkel import data_form
|
|||
|
||||
from libervia.backend.memory import memory
|
||||
from libervia.backend.tools import xml_tools
|
||||
from sat_frontends.tools.games import TarotCard
|
||||
from libervia.frontends.tools.games import TarotCard
|
||||
import random
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ class TextSyntaxes(object):
|
|||
TextSyntaxes.OPT_NO_THREAD,
|
||||
)
|
||||
# TODO: text => XHTML should add <a/> to url like in frontends
|
||||
# it's probably best to move sat_frontends.tools.strings to sat.tools.common or similar
|
||||
# it's probably best to move libervia.frontends.tools.strings to sat.tools.common or similar
|
||||
self.add_syntax(
|
||||
self.SYNTAX_TEXT,
|
||||
lambda text: escape(text),
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ XMLUI classes from this modules can then be iterated to create the template
|
|||
|
||||
from functools import partial
|
||||
from libervia.backend.core.log import getLogger
|
||||
from sat_frontends.tools import xmlui
|
||||
from sat_frontends.tools import jid
|
||||
from libervia.frontends.tools import xmlui
|
||||
from libervia.frontends.tools import jid
|
||||
try:
|
||||
from jinja2 import Markup as safe
|
||||
except ImportError:
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ from twisted.internet import reactor, defer
|
|||
from twisted.internet.error import ConnectionRefusedError, ConnectError
|
||||
from libervia.backend.core import exceptions
|
||||
from libervia.backend.tools import config
|
||||
from sat_frontends.bridge.bridge_frontend import BridgeException
|
||||
from libervia.frontends.bridge.bridge_frontend import BridgeException
|
||||
|
||||
log = getLogger(__name__)
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ from pathlib import Path
|
|||
from glob import iglob
|
||||
from typing import Optional, Set, Union
|
||||
from importlib import import_module
|
||||
from sat_frontends.tools.jid import JID
|
||||
from libervia.frontends.tools.jid import JID
|
||||
from libervia.backend.tools import config
|
||||
from libervia.backend.tools.common import dynamic_import
|
||||
from libervia.backend.tools.common import uri
|
||||
|
|
@ -45,11 +45,11 @@ from libervia.backend.tools.common import utils
|
|||
from libervia.backend.tools.common import data_format
|
||||
from libervia.backend.tools.common.ansi import ANSI as A
|
||||
from libervia.backend.core import exceptions
|
||||
import sat_frontends.jp
|
||||
from sat_frontends.jp.loops import QuitException, get_jp_loop
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from sat_frontends.bridge.bridge_frontend import BridgeException
|
||||
from sat_frontends.tools import misc
|
||||
import libervia.frontends.jp
|
||||
from libervia.frontends.jp.loops import QuitException, get_jp_loop
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.frontends.bridge.bridge_frontend import BridgeException
|
||||
from libervia.frontends.tools import misc
|
||||
import xml.etree.ElementTree as ET # FIXME: used temporarily to manage XMLUI
|
||||
from collections import OrderedDict
|
||||
|
||||
|
|
@ -108,7 +108,7 @@ class LiberviaCli:
|
|||
"""
|
||||
self.sat_conf = main_config
|
||||
self.set_color_theme()
|
||||
bridge_module = dynamic_import.bridge(bridge_name, 'sat_frontends.bridge')
|
||||
bridge_module = dynamic_import.bridge(bridge_name, 'libervia.frontends.bridge')
|
||||
if bridge_module is None:
|
||||
log.error("Can't import {} bridge".format(bridge_name))
|
||||
sys.exit(1)
|
||||
|
|
@ -523,7 +523,7 @@ class LiberviaCli:
|
|||
|
||||
looks from modules names cmd_*.py in jp path and import them
|
||||
"""
|
||||
path = os.path.dirname(sat_frontends.jp.__file__)
|
||||
path = os.path.dirname(libervia.frontends.jp.__file__)
|
||||
# XXX: outputs must be imported before commands as they are used for arguments
|
||||
for type_, pattern in ((C.PLUGIN_OUTPUT, 'output_*.py'),
|
||||
(C.PLUGIN_CMD, 'cmd_*.py')):
|
||||
|
|
@ -531,7 +531,7 @@ class LiberviaCli:
|
|||
os.path.splitext(module)[0]
|
||||
for module in map(os.path.basename, iglob(os.path.join(path, pattern))))
|
||||
for module_name in modules:
|
||||
module_path = "sat_frontends.jp." + module_name
|
||||
module_path = "libervia.frontends.jp." + module_name
|
||||
try:
|
||||
module = import_module(module_path)
|
||||
self.import_plugin_module(module, type_)
|
||||
|
|
@ -19,12 +19,12 @@
|
|||
|
||||
"""This module permits to manage XMPP accounts using in-band registration (XEP-0077)"""
|
||||
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from sat_frontends.bridge.bridge_frontend import BridgeException
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.frontends.bridge.bridge_frontend import BridgeException
|
||||
from libervia.backend.core.log import getLogger
|
||||
from libervia.backend.core.i18n import _
|
||||
from sat_frontends.jp import base
|
||||
from sat_frontends.tools import jid
|
||||
from libervia.frontends.jp import base
|
||||
from libervia.frontends.tools import jid
|
||||
|
||||
|
||||
log = getLogger(__name__)
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
|
||||
from . import base
|
||||
from libervia.backend.core.i18n import _
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from sat_frontends.jp import xmlui_manager
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp import xmlui_manager
|
||||
|
||||
__commands__ = ["AdHoc"]
|
||||
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
from . import base
|
||||
from libervia.backend.core.i18n import _
|
||||
from libervia.backend.tools.common import data_format
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
|
||||
__commands__ = ["Application"]
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ import os.path
|
|||
import asyncio
|
||||
from . import base
|
||||
from libervia.backend.core.i18n import _
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.backend.tools import config
|
||||
from libervia.backend.tools.common import data_format
|
||||
|
||||
|
|
@ -22,8 +22,8 @@ import json
|
|||
import os
|
||||
from libervia.backend.core.i18n import _
|
||||
from libervia.backend.tools.common import data_format
|
||||
from sat_frontends.jp import common
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp import common
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from . import base
|
||||
|
||||
__commands__ = ["Blocking"]
|
||||
|
|
@ -36,8 +36,8 @@ from libervia.backend.tools import config
|
|||
from libervia.backend.tools.common import uri
|
||||
from libervia.backend.tools.common import data_format
|
||||
from libervia.backend.tools.common.ansi import ANSI as A
|
||||
from sat_frontends.jp import common
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp import common
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
|
||||
from . import base, cmd_pubsub
|
||||
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
from . import base
|
||||
from libervia.backend.core.i18n import _
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
|
||||
__commands__ = ["Bookmarks"]
|
||||
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
from . import base
|
||||
from libervia.backend.core.i18n import _
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.backend.tools.common.ansi import ANSI as A
|
||||
import json
|
||||
|
||||
|
|
@ -17,11 +17,11 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from sat_frontends.jp import base
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp import base
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.backend.core.i18n import _
|
||||
from libervia.backend.tools.common import data_format
|
||||
from sat_frontends.jp import xmlui_manager
|
||||
from libervia.frontends.jp import xmlui_manager
|
||||
|
||||
__commands__ = ["Encryption"]
|
||||
|
||||
|
|
@ -30,9 +30,9 @@ from libervia.backend.tools.common import data_format
|
|||
from libervia.backend.tools.common import date_utils
|
||||
from libervia.backend.tools.common.ansi import ANSI as A
|
||||
from libervia.backend.tools.common.ansi import ANSI as A
|
||||
from sat_frontends.jp import common
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp import common
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
|
||||
from . import base
|
||||
|
||||
|
|
@ -26,9 +26,9 @@ import os.path
|
|||
import tarfile
|
||||
from libervia.backend.core.i18n import _
|
||||
from libervia.backend.tools.common import data_format
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from sat_frontends.jp import common
|
||||
from sat_frontends.tools import jid
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp import common
|
||||
from libervia.frontends.tools import jid
|
||||
from libervia.backend.tools.common.ansi import ANSI as A
|
||||
from libervia.backend.tools.common import utils
|
||||
from urllib.parse import urlparse
|
||||
|
|
@ -20,8 +20,8 @@
|
|||
|
||||
from . import base
|
||||
from libervia.backend.core.i18n import _
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from sat_frontends.jp import common
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp import common
|
||||
from libervia.backend.tools.common.ansi import ANSI as A
|
||||
import codecs
|
||||
import json
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
from . import base
|
||||
from libervia.backend.core.i18n import _
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.backend.tools.common import data_format
|
||||
|
||||
__commands__ = ["Identity"]
|
||||
|
|
@ -22,8 +22,8 @@ from pprint import pformat
|
|||
from libervia.backend.core.i18n import _
|
||||
from libervia.backend.tools.common import data_format, date_utils
|
||||
from libervia.backend.tools.common.ansi import ANSI as A
|
||||
from sat_frontends.jp import common
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp import common
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
|
||||
from . import base
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ import asyncio
|
|||
from . import base
|
||||
from libervia.backend.core.i18n import _
|
||||
from libervia.backend.core import exceptions
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.backend.tools.common.ansi import ANSI as A
|
||||
|
||||
__commands__ = ["Input"]
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
from . import base
|
||||
from libervia.backend.core.i18n import _
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.backend.tools.common.ansi import ANSI as A
|
||||
from libervia.backend.tools.common import data_format
|
||||
|
||||
|
|
@ -22,8 +22,8 @@ import json
|
|||
import os
|
||||
from libervia.backend.core.i18n import _
|
||||
from libervia.backend.tools.common import data_format
|
||||
from sat_frontends.jp import common
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp import common
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from . import base
|
||||
|
||||
__commands__ = ["List"]
|
||||
|
|
@ -22,9 +22,9 @@ import os.path
|
|||
from . import base
|
||||
from libervia.backend.core.i18n import _
|
||||
from libervia.backend.tools.common import data_format
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from sat_frontends.jp import xmlui_manager
|
||||
from sat_frontends.jp import common
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp import xmlui_manager
|
||||
from libervia.frontends.jp import common
|
||||
|
||||
__commands__ = ["MergeRequest"]
|
||||
|
||||
|
|
@ -26,9 +26,9 @@ from libervia.backend.core.i18n import _
|
|||
from libervia.backend.tools.common import data_format
|
||||
from libervia.backend.tools.common.ansi import ANSI as A
|
||||
from libervia.backend.tools.utils import clean_ustr
|
||||
from sat_frontends.jp import base
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from sat_frontends.tools import jid
|
||||
from libervia.frontends.jp import base
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.frontends.tools import jid
|
||||
|
||||
|
||||
__commands__ = ["Message"]
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
from . import base
|
||||
from libervia.backend.core.i18n import _
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
|
||||
__commands__ = ["Ping"]
|
||||
|
||||
|
|
@ -25,10 +25,10 @@ import sys
|
|||
|
||||
from libervia.backend.core.i18n import _
|
||||
from libervia.backend.tools.common import data_format
|
||||
from sat_frontends.jp import base
|
||||
from sat_frontends.jp import xmlui_manager
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from sat_frontends.tools import jid
|
||||
from libervia.frontends.jp import base
|
||||
from libervia.frontends.jp import xmlui_manager
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.frontends.tools import jid
|
||||
|
||||
__commands__ = ["Pipe"]
|
||||
|
||||
|
|
@ -20,10 +20,10 @@
|
|||
"""This module permits to manage profiles. It can list, create, delete
|
||||
and retrieve information about a profile."""
|
||||
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.backend.core.log import getLogger
|
||||
from libervia.backend.core.i18n import _
|
||||
from sat_frontends.jp import base
|
||||
from libervia.frontends.jp import base
|
||||
|
||||
log = getLogger(__name__)
|
||||
|
||||
|
|
@ -28,17 +28,17 @@ import json
|
|||
from . import base
|
||||
from libervia.backend.core.i18n import _
|
||||
from libervia.backend.core import exceptions
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from sat_frontends.jp import common
|
||||
from sat_frontends.jp import arg_tools
|
||||
from sat_frontends.jp import xml_tools
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp import common
|
||||
from libervia.frontends.jp import arg_tools
|
||||
from libervia.frontends.jp import xml_tools
|
||||
from functools import partial
|
||||
from libervia.backend.tools.common import data_format
|
||||
from libervia.backend.tools.common import uri
|
||||
from libervia.backend.tools.common.ansi import ANSI as A
|
||||
from libervia.backend.tools.common import date_utils
|
||||
from sat_frontends.tools import jid, strings
|
||||
from sat_frontends.bridge.bridge_frontend import BridgeException
|
||||
from libervia.frontends.tools import jid, strings
|
||||
from libervia.frontends.bridge.bridge_frontend import BridgeException
|
||||
|
||||
__commands__ = ["Pubsub"]
|
||||
|
||||
|
|
@ -20,8 +20,8 @@
|
|||
from . import base
|
||||
from collections import OrderedDict
|
||||
from libervia.backend.core.i18n import _
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from sat_frontends.tools import jid
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.frontends.tools import jid
|
||||
from libervia.backend.tools.common.ansi import ANSI as A
|
||||
|
||||
__commands__ = ["Roster"]
|
||||
|
|
@ -25,8 +25,8 @@ import subprocess
|
|||
from . import base
|
||||
from libervia.backend.core.i18n import _
|
||||
from libervia.backend.core import exceptions
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from sat_frontends.jp import arg_tools
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp import arg_tools
|
||||
from libervia.backend.tools.common.ansi import ANSI as A
|
||||
|
||||
__commands__ = ["Shell"]
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
from . import base
|
||||
from libervia.backend.core.i18n import _
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.backend.tools.common import uri
|
||||
|
||||
__commands__ = ["Uri"]
|
||||
|
|
@ -26,7 +26,7 @@ import asyncio
|
|||
import shlex
|
||||
import re
|
||||
from pathlib import Path
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.backend.core.i18n import _
|
||||
from libervia.backend.core import exceptions
|
||||
from libervia.backend.tools.common import regex
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from sat_frontends.quick_frontend import constants
|
||||
from libervia.frontends.quick_frontend import constants
|
||||
from libervia.backend.tools.common.ansi import ANSI as A
|
||||
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ import sys
|
|||
import asyncio
|
||||
import logging as log
|
||||
from libervia.backend.core.i18n import _
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
|
||||
log.basicConfig(level=log.WARNING,
|
||||
format='[%(name)s] %(message)s')
|
||||
|
|
@ -117,7 +117,7 @@ def get_jp_loop(bridge_name):
|
|||
ret = callback(*args)
|
||||
# FIXME: temporary hack to avoid traceback when using XMLUI
|
||||
# to be removed once create_task is not used anymore in
|
||||
# xmlui_manager (i.e. once sat_frontends.tools.xmlui fully supports
|
||||
# xmlui_manager (i.e. once libervia.frontends.tools.xmlui fully supports
|
||||
# async syntax)
|
||||
except QuitException:
|
||||
return
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
"""Standard outputs"""
|
||||
|
||||
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from sat_frontends.tools import jid
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.frontends.tools import jid
|
||||
from libervia.backend.tools.common.ansi import ANSI as A
|
||||
from libervia.backend.tools.common import date_utils
|
||||
import json
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
"""Standard outputs"""
|
||||
|
||||
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.backend.core.i18n import _
|
||||
from libervia.backend.core import log
|
||||
from libervia.backend.tools.common import template
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
"""Standard outputs"""
|
||||
|
||||
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.backend.core.i18n import _
|
||||
from lxml import etree
|
||||
from libervia.backend.core.log import getLogger
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
"""Standard outputs"""
|
||||
|
||||
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from sat_frontends.jp import xmlui_manager
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp import xmlui_manager
|
||||
from libervia.backend.core.log import getLogger
|
||||
|
||||
log = getLogger(__name__)
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from libervia.backend.core.i18n import _
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
|
||||
def etree_parse(cmd, raw_xml, reraise=False):
|
||||
"""import lxml and parse raw XML
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
|
||||
from functools import partial
|
||||
from libervia.backend.core.log import getLogger
|
||||
from sat_frontends.tools import xmlui as xmlui_base
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from libervia.frontends.tools import xmlui as xmlui_base
|
||||
from libervia.frontends.jp.constants import Const as C
|
||||
from libervia.backend.tools.common.ansi import ANSI as A
|
||||
from libervia.backend.core.i18n import _
|
||||
from libervia.backend.tools.common import data_format
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
|
||||
from libervia.backend.core.i18n import _, D_
|
||||
from sat_frontends.primitivus.constants import Const as C
|
||||
from libervia.frontends.primitivus.constants import Const as C
|
||||
from libervia.backend.core import log_config
|
||||
log_config.sat_configure(C.LOG_BACKEND_STANDARD, C)
|
||||
from libervia.backend.core import log as logging
|
||||
|
|
@ -27,20 +27,20 @@ from libervia.backend.tools import config as sat_config
|
|||
import urwid
|
||||
from urwid.util import is_wide_char
|
||||
from urwid_satext import sat_widgets
|
||||
from sat_frontends.quick_frontend.quick_app import QuickApp
|
||||
from sat_frontends.quick_frontend import quick_utils
|
||||
from sat_frontends.quick_frontend import quick_chat
|
||||
from sat_frontends.primitivus.profile_manager import ProfileManager
|
||||
from sat_frontends.primitivus.contact_list import ContactList
|
||||
from sat_frontends.primitivus.chat import Chat
|
||||
from sat_frontends.primitivus import xmlui
|
||||
from sat_frontends.primitivus.progress import Progress
|
||||
from sat_frontends.primitivus.notify import Notify
|
||||
from sat_frontends.primitivus.keys import action_key_map as a_key
|
||||
from sat_frontends.primitivus import config
|
||||
from sat_frontends.tools.misc import InputHistory
|
||||
from libervia.frontends.quick_frontend.quick_app import QuickApp
|
||||
from libervia.frontends.quick_frontend import quick_utils
|
||||
from libervia.frontends.quick_frontend import quick_chat
|
||||
from libervia.frontends.primitivus.profile_manager import ProfileManager
|
||||
from libervia.frontends.primitivus.contact_list import ContactList
|
||||
from libervia.frontends.primitivus.chat import Chat
|
||||
from libervia.frontends.primitivus import xmlui
|
||||
from libervia.frontends.primitivus.progress import Progress
|
||||
from libervia.frontends.primitivus.notify import Notify
|
||||
from libervia.frontends.primitivus.keys import action_key_map as a_key
|
||||
from libervia.frontends.primitivus import config
|
||||
from libervia.frontends.tools.misc import InputHistory
|
||||
from libervia.backend.tools.common import dynamic_import
|
||||
from sat_frontends.tools import jid
|
||||
from libervia.frontends.tools import jid
|
||||
import signal
|
||||
import sys
|
||||
## bridge handling
|
||||
|
|
@ -283,7 +283,7 @@ class PrimitivusApp(QuickApp, InputHistory):
|
|||
AVATARS_HANDLER = False
|
||||
|
||||
def __init__(self):
|
||||
bridge_module = dynamic_import.bridge(bridge_name, 'sat_frontends.bridge')
|
||||
bridge_module = dynamic_import.bridge(bridge_name, 'libervia.frontends.bridge')
|
||||
if bridge_module is None:
|
||||
log.error(u"Can't import {} bridge".format(bridge_name))
|
||||
sys.exit(3)
|
||||
|
|
@ -24,14 +24,14 @@ import urwid
|
|||
from urwid_satext import sat_widgets
|
||||
from libervia.backend.core.i18n import _
|
||||
from libervia.backend.core import log as logging
|
||||
from sat_frontends.quick_frontend import quick_widgets
|
||||
from sat_frontends.quick_frontend import quick_chat
|
||||
from sat_frontends.quick_frontend import quick_games
|
||||
from sat_frontends.primitivus import game_tarot
|
||||
from sat_frontends.primitivus.constants import Const as C
|
||||
from sat_frontends.primitivus.keys import action_key_map as a_key
|
||||
from sat_frontends.primitivus.widget import PrimitivusWidget
|
||||
from sat_frontends.primitivus.contact_list import ContactList
|
||||
from libervia.frontends.quick_frontend import quick_widgets
|
||||
from libervia.frontends.quick_frontend import quick_chat
|
||||
from libervia.frontends.quick_frontend import quick_games
|
||||
from libervia.frontends.primitivus import game_tarot
|
||||
from libervia.frontends.primitivus.constants import Const as C
|
||||
from libervia.frontends.primitivus.keys import action_key_map as a_key
|
||||
from libervia.frontends.primitivus.widget import PrimitivusWidget
|
||||
from libervia.frontends.primitivus.contact_list import ContactList
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
|
||||
"""This module manage configuration specific to Primitivus"""
|
||||
|
||||
from sat_frontends.primitivus.constants import Const as C
|
||||
from sat_frontends.primitivus.keys import action_key_map
|
||||
from libervia.frontends.primitivus.constants import Const as C
|
||||
from libervia.frontends.primitivus.keys import action_key_map
|
||||
import configparser
|
||||
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from sat_frontends.quick_frontend import constants
|
||||
from libervia.frontends.quick_frontend import constants
|
||||
|
||||
|
||||
class Const(constants.Const):
|
||||
|
|
@ -20,16 +20,16 @@
|
|||
from libervia.backend.core.i18n import _
|
||||
import urwid
|
||||
from urwid_satext import sat_widgets
|
||||
from sat_frontends.quick_frontend.quick_contact_list import QuickContactList
|
||||
from sat_frontends.primitivus.status import StatusBar
|
||||
from sat_frontends.primitivus.constants import Const as C
|
||||
from sat_frontends.primitivus.keys import action_key_map as a_key
|
||||
from sat_frontends.primitivus.widget import PrimitivusWidget
|
||||
from sat_frontends.tools import jid
|
||||
from libervia.frontends.quick_frontend.quick_contact_list import QuickContactList
|
||||
from libervia.frontends.primitivus.status import StatusBar
|
||||
from libervia.frontends.primitivus.constants import Const as C
|
||||
from libervia.frontends.primitivus.keys import action_key_map as a_key
|
||||
from libervia.frontends.primitivus.widget import PrimitivusWidget
|
||||
from libervia.frontends.tools import jid
|
||||
from libervia.backend.core import log as logging
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
from sat_frontends.quick_frontend import quick_widgets
|
||||
from libervia.frontends.quick_frontend import quick_widgets
|
||||
|
||||
|
||||
class ContactList(PrimitivusWidget, QuickContactList):
|
||||
|
|
@ -107,7 +107,7 @@ class ContactList(PrimitivusWidget, QuickContactList):
|
|||
|
||||
def set_focus(self, text, select=False):
|
||||
"""give focus to the first element that matches the given text. You can also
|
||||
pass in text a sat_frontends.tools.jid.JID (it's a subclass of unicode).
|
||||
pass in text a libervia.frontends.tools.jid.JID (it's a subclass of unicode).
|
||||
|
||||
@param text: contact group name, contact or muc userhost, muc private dialog jid
|
||||
@param select: if True, the element is also clicked
|
||||
|
|
@ -20,10 +20,10 @@
|
|||
from libervia.backend.core.i18n import _
|
||||
import urwid
|
||||
from urwid_satext import sat_widgets
|
||||
from sat_frontends.tools.games import TarotCard
|
||||
from sat_frontends.quick_frontend.quick_game_tarot import QuickTarotGame
|
||||
from sat_frontends.primitivus import xmlui
|
||||
from sat_frontends.primitivus.keys import action_key_map as a_key
|
||||
from libervia.frontends.tools.games import TarotCard
|
||||
from libervia.frontends.quick_frontend.quick_game_tarot import QuickTarotGame
|
||||
from libervia.frontends.primitivus import xmlui
|
||||
from libervia.frontends.primitivus.keys import action_key_map as a_key
|
||||
|
||||
|
||||
class CardDisplayer(urwid.Text):
|
||||
|
|
@ -21,9 +21,9 @@ from libervia.backend.core.i18n import _
|
|||
from libervia.backend.core import log as logging
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
from sat_frontends.quick_frontend.quick_profile_manager import QuickProfileManager
|
||||
from sat_frontends.primitivus.constants import Const as C
|
||||
from sat_frontends.primitivus.keys import action_key_map as a_key
|
||||
from libervia.frontends.quick_frontend.quick_profile_manager import QuickProfileManager
|
||||
from libervia.frontends.primitivus.constants import Const as C
|
||||
from libervia.frontends.primitivus.keys import action_key_map as a_key
|
||||
from urwid_satext import sat_widgets
|
||||
import urwid
|
||||
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
from libervia.backend.core.i18n import _
|
||||
import urwid
|
||||
from urwid_satext import sat_widgets
|
||||
from sat_frontends.quick_frontend import quick_widgets
|
||||
from libervia.frontends.quick_frontend import quick_widgets
|
||||
|
||||
|
||||
class Progress(urwid.WidgetWrap, quick_widgets.QuickWidget):
|
||||
|
|
@ -20,8 +20,8 @@
|
|||
from libervia.backend.core.i18n import _
|
||||
import urwid
|
||||
from urwid_satext import sat_widgets
|
||||
from sat_frontends.quick_frontend.constants import Const as commonConst
|
||||
from sat_frontends.primitivus.constants import Const as C
|
||||
from libervia.frontends.quick_frontend.constants import Const as commonConst
|
||||
from libervia.frontends.primitivus.constants import Const as C
|
||||
|
||||
|
||||
class StatusBar(urwid.Columns):
|
||||
|
|
@ -22,7 +22,7 @@ from libervia.backend.core import log as logging
|
|||
log = logging.getLogger(__name__)
|
||||
import urwid
|
||||
from urwid_satext import sat_widgets
|
||||
from sat_frontends.primitivus.keys import action_key_map as a_key
|
||||
from libervia.frontends.primitivus.keys import action_key_map as a_key
|
||||
|
||||
|
||||
class PrimitivusWidget(urwid.WidgetWrap):
|
||||
|
|
@ -26,9 +26,9 @@ from urwid_satext import files_management
|
|||
from libervia.backend.core.log import getLogger
|
||||
|
||||
log = getLogger(__name__)
|
||||
from sat_frontends.primitivus.constants import Const as C
|
||||
from sat_frontends.primitivus.widget import PrimitivusWidget
|
||||
from sat_frontends.tools import xmlui
|
||||
from libervia.frontends.primitivus.constants import Const as C
|
||||
from libervia.frontends.primitivus.widget import PrimitivusWidget
|
||||
from libervia.frontends.tools import xmlui
|
||||
|
||||
|
||||
class PrimitivusEvents(object):
|
||||
|
|
@ -22,13 +22,13 @@ from libervia.backend.core import exceptions
|
|||
from libervia.backend.tools import trigger
|
||||
from libervia.backend.tools.common import data_format
|
||||
|
||||
from sat_frontends.tools import jid
|
||||
from sat_frontends.quick_frontend import quick_widgets
|
||||
from sat_frontends.quick_frontend import quick_menus
|
||||
from sat_frontends.quick_frontend import quick_blog
|
||||
from sat_frontends.quick_frontend import quick_chat, quick_games
|
||||
from sat_frontends.quick_frontend import quick_contact_list
|
||||
from sat_frontends.quick_frontend.constants import Const as C
|
||||
from libervia.frontends.tools import jid
|
||||
from libervia.frontends.quick_frontend import quick_widgets
|
||||
from libervia.frontends.quick_frontend import quick_menus
|
||||
from libervia.frontends.quick_frontend import quick_blog
|
||||
from libervia.frontends.quick_frontend import quick_chat, quick_games
|
||||
from libervia.frontends.quick_frontend import quick_contact_list
|
||||
from libervia.frontends.quick_frontend.constants import Const as C
|
||||
|
||||
import sys
|
||||
import time
|
||||
|
|
@ -23,9 +23,9 @@ from libervia.backend.core.log import getLogger
|
|||
log = getLogger(__name__)
|
||||
|
||||
|
||||
from sat_frontends.quick_frontend.constants import Const as C
|
||||
from sat_frontends.quick_frontend import quick_widgets
|
||||
from sat_frontends.tools import jid
|
||||
from libervia.frontends.quick_frontend.constants import Const as C
|
||||
from libervia.frontends.quick_frontend import quick_widgets
|
||||
from libervia.frontends.tools import jid
|
||||
from libervia.backend.tools.common import data_format
|
||||
|
||||
try:
|
||||
|
|
@ -20,10 +20,10 @@ from libervia.backend.core.i18n import _
|
|||
from libervia.backend.core.log import getLogger
|
||||
from libervia.backend.tools.common import data_format
|
||||
from libervia.backend.core import exceptions
|
||||
from sat_frontends.quick_frontend import quick_widgets
|
||||
from sat_frontends.quick_frontend.constants import Const as C
|
||||
from libervia.frontends.quick_frontend import quick_widgets
|
||||
from libervia.frontends.quick_frontend.constants import Const as C
|
||||
from collections import OrderedDict
|
||||
from sat_frontends.tools import jid
|
||||
from libervia.frontends.tools import jid
|
||||
import time
|
||||
|
||||
|
||||
|
|
@ -22,9 +22,9 @@
|
|||
from libervia.backend.core.i18n import _
|
||||
from libervia.backend.core.log import getLogger
|
||||
from libervia.backend.core import exceptions
|
||||
from sat_frontends.quick_frontend.quick_widgets import QuickWidget
|
||||
from sat_frontends.quick_frontend.constants import Const as C
|
||||
from sat_frontends.tools import jid
|
||||
from libervia.frontends.quick_frontend.quick_widgets import QuickWidget
|
||||
from libervia.frontends.quick_frontend.constants import Const as C
|
||||
from libervia.frontends.tools import jid
|
||||
from collections import OrderedDict
|
||||
|
||||
log = getLogger(__name__)
|
||||
|
|
@ -21,7 +21,7 @@ from libervia.backend.core.i18n import _
|
|||
from libervia.backend.core.log import getLogger
|
||||
|
||||
log = getLogger(__name__)
|
||||
from sat_frontends.tools.jid import JID
|
||||
from libervia.frontends.tools.jid import JID
|
||||
|
||||
|
||||
class QuickContactManagement(object):
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
from libervia.backend.core.log import getLogger
|
||||
|
||||
log = getLogger(__name__)
|
||||
from sat_frontends.tools.jid import JID
|
||||
from libervia.frontends.tools.jid import JID
|
||||
|
||||
|
||||
class QuickTarotGame(object):
|
||||
|
|
@ -23,9 +23,9 @@ log = getLogger(__name__)
|
|||
|
||||
from libervia.backend.core.i18n import _
|
||||
|
||||
from sat_frontends.tools import jid
|
||||
from sat_frontends.tools import games
|
||||
from sat_frontends.quick_frontend.constants import Const as C
|
||||
from libervia.frontends.tools import jid
|
||||
from libervia.frontends.tools import games
|
||||
from libervia.frontends.quick_frontend.constants import Const as C
|
||||
|
||||
from . import quick_chat
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ from libervia.backend.core.log import getLogger
|
|||
from libervia.backend.core.i18n import _, language_switch
|
||||
|
||||
log = getLogger(__name__)
|
||||
from sat_frontends.quick_frontend.constants import Const as C
|
||||
from libervia.frontends.quick_frontend.constants import Const as C
|
||||
from collections import OrderedDict
|
||||
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ from libervia.backend.core.i18n import _
|
|||
from libervia.backend.core import log as logging
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
from sat_frontends.primitivus.constants import Const as C
|
||||
from libervia.frontends.primitivus.constants import Const as C
|
||||
|
||||
|
||||
class ProfileRecord(object):
|
||||
|
|
@ -21,7 +21,7 @@ from libervia.backend.core.log import getLogger
|
|||
|
||||
log = getLogger(__name__)
|
||||
from libervia.backend.core import exceptions
|
||||
from sat_frontends.quick_frontend.constants import Const as C
|
||||
from libervia.frontends.quick_frontend.constants import Const as C
|
||||
|
||||
|
||||
classes_map = {}
|
||||
|
|
@ -21,7 +21,7 @@ from libervia.backend.core.i18n import _
|
|||
from libervia.backend.core.log import getLogger
|
||||
|
||||
log = getLogger(__name__)
|
||||
from sat_frontends.quick_frontend.constants import Const as C
|
||||
from libervia.frontends.quick_frontend.constants import Const as C
|
||||
from libervia.backend.core import exceptions
|
||||
|
||||
|
||||
10
setup.py
10
setup.py
|
|
@ -132,13 +132,13 @@ setup(
|
|||
"sat = libervia.backend.core.launcher:Launcher.run",
|
||||
|
||||
# CLI + aliases
|
||||
"libervia-cli = sat_frontends.jp.base:LiberviaCli.run",
|
||||
"li = sat_frontends.jp.base:LiberviaCli.run",
|
||||
"jp = sat_frontends.jp.base:LiberviaCli.run",
|
||||
"libervia-cli = libervia.frontends.jp.base:LiberviaCli.run",
|
||||
"li = libervia.frontends.jp.base:LiberviaCli.run",
|
||||
"jp = libervia.frontends.jp.base:LiberviaCli.run",
|
||||
|
||||
# TUI + alias
|
||||
"libervia-tui = sat_frontends.primitivus.base:PrimitivusApp.run",
|
||||
"primitivus = sat_frontends.primitivus.base:PrimitivusApp.run",
|
||||
"libervia-tui = libervia.frontends.primitivus.base:PrimitivusApp.run",
|
||||
"primitivus = libervia.frontends.primitivus.base:PrimitivusApp.run",
|
||||
],
|
||||
},
|
||||
zip_safe=False,
|
||||
|
|
|
|||
Loading…
Reference in a new issue