diff --git a/guiTools/poetry.lock b/guiTools/poetry.lock index e1a440d..a9a45e8 100644 --- a/guiTools/poetry.lock +++ b/guiTools/poetry.lock @@ -177,21 +177,6 @@ files = [ {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, ] -[[package]] -name = "ansi2html" -version = "1.9.2" -description = "Convert text with ANSI color codes to HTML or to LaTeX" -optional = false -python-versions = ">=3.7" -files = [ - {file = "ansi2html-1.9.2-py3-none-any.whl", hash = "sha256:dccb75aa95fb018e5d299be2b45f802952377abfdce0504c17a6ee6ef0a420c5"}, - {file = "ansi2html-1.9.2.tar.gz", hash = "sha256:3453bf87535d37b827b05245faaa756dbab4ec3d69925e352b6319c3c955c0a5"}, -] - -[package.extras] -docs = ["mkdocs", "mkdocs-material", "mkdocs-material-extensions", "mkdocstrings", "mkdocstrings-python", "pymdown-extensions"] -test = ["pytest", "pytest-cov"] - [[package]] name = "anyio" version = "4.6.2.post1" @@ -2158,4 +2143,4 @@ propcache = ">=0.2.0" [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "fb89def5cebe48bacf2ecf52d3a52988c2ca964a523857d34ea037ff287120c6" +content-hash = "e6d65a92946717f8c239c1920193c45a350d163ec22316a8218828b4580c072f" diff --git a/guiTools/pyproject.toml b/guiTools/pyproject.toml index ad579cd..876be04 100644 --- a/guiTools/pyproject.toml +++ b/guiTools/pyproject.toml @@ -13,7 +13,6 @@ loguru = "^0.7.2" sh = "^2.1.0" docker = "^7.1.0" aiodocker = "^0.23.0" -ansi2html = "^1.9.2" [build-system] requires = ["poetry-core"] diff --git a/guiTools/spiri_sdk_guitools/launcher.py b/guiTools/spiri_sdk_guitools/launcher.py index 6d53bf0..c44ddeb 100644 --- a/guiTools/spiri_sdk_guitools/launcher.py +++ b/guiTools/spiri_sdk_guitools/launcher.py @@ -5,8 +5,6 @@ import docker import time docker_client = docker.from_env() -from ansi2html import Ansi2HTMLConverter -conv = Ansi2HTMLConverter() # Dictionary of applications: key is the button text, value is the command to execute applications = { diff --git a/guiTools/spiri_sdk_guitools/sim_drone.py b/guiTools/spiri_sdk_guitools/sim_drone.py index 904d8ed..8cf519d 100644 --- a/guiTools/spiri_sdk_guitools/sim_drone.py +++ b/guiTools/spiri_sdk_guitools/sim_drone.py @@ -49,8 +49,9 @@ async def container_logs(container, element): with element: acontainer = await adocker.containers.get(container.id) async for log in acontainer.log(stdout=True, stderr=True, follow=True): - ui.label(log) - # ui.html(conv.convert(log) + for line in log.splitlines(): + ui.label(line) + # ui.html(conv.convert(bytes(log,'utf-8').decode('utf-8', 'xmlcharrefreplace'), full=False)) class Robot: robot_type = "spiri-mu" @@ -141,7 +142,6 @@ class Robot: compose_file = Path(compose_file) if not compose_file.exists(): raise FileNotFoundError(f"File {compose_file} does not exist") - ui.label(f"Starting drone stack {compose_file}") args = [ "docker-compose", "--profile",