From 2670952f7d31e5eb63e6ef777a00b12244d57608 Mon Sep 17 00:00:00 2001 From: Florent de Lamotte Date: Wed, 30 Apr 2025 09:46:08 +0200 Subject: [PATCH] better description in version --- src/meshcore_cli/meshcore_cli.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/meshcore_cli/meshcore_cli.py b/src/meshcore_cli/meshcore_cli.py index 130fd73..ae640aa 100644 --- a/src/meshcore_cli/meshcore_cli.py +++ b/src/meshcore_cli/meshcore_cli.py @@ -22,7 +22,7 @@ from meshcore import TCPConnection, BLEConnection, SerialConnection from meshcore import MeshCore, EventType, logger # Version -VERSION = "0.7.5" +VERSION = "v0.7.5" # default ble address is stored in a config file MCCLI_CONFIG_DIR = str(Path.home()) + "/.config/meshcore/" @@ -1358,6 +1358,9 @@ async def process_script(mc, file, json_output=False): cmds = shlex.split(line[:-1]) await process_cmds(mc, cmds, json_output) +def version(): + print (f"meshcore-cli: command line interface to MeshCore companion radios {VERSION}") + def command_help(): print(""" General commands chat : enter the chat (interactive) mode @@ -1403,8 +1406,8 @@ def command_help(): def usage () : """ Prints some help """ - print("""meshcore-cli : CLI interface to MeschCore BLE companion app - + version() + print(""" Usage : meshcore-cli Arguments : @@ -1467,7 +1470,7 @@ async def main(argv): case "-T" : timeout = float(arg) case "-v": - print (f"meshcore-cli: command line interface to MeshCore version {VERSION}") + version() return case "-l" : devices = await BleakScanner.discover(timeout=timeout)