cli: update constants to use new name

This commit is contained in:
Goffi 2021-06-09 17:29:29 +02:00
commit 8b3d900922
2 changed files with 7 additions and 4 deletions

View file

@ -68,7 +68,6 @@ except ImportError:
progressbar=None
#consts
PROG_NAME = "jp"
DESCRIPTION = """This software is a command line tool for XMPP.
Get the latest version at """ + C.APP_URL
@ -115,7 +114,7 @@ class LiberviaCli:
self.bridge = bridge_module.AIOBridge()
self._onQuitCallbacks = []
def get_config(self, name, section='cli', default=None):
def get_config(self, name, section=C.CONFIG_SECTION, default=None):
"""Retrieve a setting value from sat.conf"""
return config.getConfig(self.sat_conf, section, name, default=default)
@ -435,7 +434,7 @@ class LiberviaCli:
'--version',
action='version',
version=("{name} {version} {copyleft}".format(
name = PROG_NAME,
name = C.APP_NAME,
version = self.version,
copyleft = COPYLEFT))
)

View file

@ -23,7 +23,11 @@ from sat.tools.common.ansi import ANSI as A
class Const(constants.Const):
APP_NAME = "jp"
APP_NAME = "Libervia CLI"
APP_COMPONENT = "CLI"
APP_NAME_ALT = "jp"
APP_NAME_FILE = "libervia_cli"
CONFIG_SECTION = APP_COMPONENT.lower()
PLUGIN_CMD = "commands"
PLUGIN_OUTPUT = "outputs"
OUTPUT_TEXT = "text" # blob of unicode text