diff --git a/common/__init__.py b/common/__init__.py index e6d35723..2830cf80 100644 --- a/common/__init__.py +++ b/common/__init__.py @@ -8,6 +8,7 @@ """ from . import consts +from .consts import getVersionString from .logger import log, verbosity diff --git a/common/consts.py b/common/consts.py index 33030a8f..7031d250 100644 --- a/common/consts.py +++ b/common/consts.py @@ -8,7 +8,7 @@ """ # Version info -VERSION = (0, 0, 1) +VERSION = (0, 1, 0) VERSION_MAJOR = VERSION[0] VERSION_MINOR = VERSION[1] @@ -17,6 +17,8 @@ def getVersionString() -> str: """ Returns the version string of the script + + Eg: "1.2.3" """ return ".".join(map(str, VERSION)) diff --git a/device_eventforward.py b/device_eventforward.py index 44717dab..74aeca30 100644 --- a/device_eventforward.py +++ b/device_eventforward.py @@ -55,6 +55,7 @@ import time from typing import TYPE_CHECKING from common import log, verbosity +from common.consts import getVersionString, ASCII_HEADER_ART from common.util.events import bytesToString, eventToString from common.util.misc import formatLongTime from common.types import eventData @@ -132,3 +133,6 @@ def OnInit(): "device.forward.bootstrap", "Loaded script successfully" ) + +print(ASCII_HEADER_ART) +print(f"Universal Event Forwarder: v{getVersionString()}") diff --git a/device_universal.py b/device_universal.py index 03c41b86..65541648 100644 --- a/device_universal.py +++ b/device_universal.py @@ -17,7 +17,7 @@ import include # Get context, and context reset wrapper -from common import getContext, catchContextResetException +from common import getContext, catchContextResetException, getVersionString # Function to allow user to reset context from common.contextmanager import unsafeResetContext as reset # Import constants and logger @@ -45,6 +45,7 @@ def onIdle(self) -> None: def bootstrap(self): log("bootstrap.initialize", "Load success", verbosity.INFO) print(consts.ASCII_HEADER_ART) + print(f"Universal Controller Script: v{getVersionString()}") print(ExtensionManager.getInfo()) print("Type `help` for help using the script\n")