cgse-tools 2025.0.8.dev4__tar.gz → 2025.0.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cgse_tools-2025.0.8.dev4 → cgse_tools-2025.0.9}/PKG-INFO +1 -1
- {cgse_tools-2025.0.8.dev4 → cgse_tools-2025.0.9}/pyproject.toml +2 -1
- cgse_tools-2025.0.9/src/cgse_tools/cgse_clock.py +47 -0
- {cgse_tools-2025.0.8.dev4 → cgse_tools-2025.0.9}/.gitignore +0 -0
- {cgse_tools-2025.0.8.dev4 → cgse_tools-2025.0.9}/README.md +0 -0
- {cgse_tools-2025.0.8.dev4 → cgse_tools-2025.0.9}/src/cgse_tools/__init__.py +0 -0
- {cgse_tools-2025.0.8.dev4 → cgse_tools-2025.0.9}/src/cgse_tools/cgse_commands.py +0 -0
- {cgse_tools-2025.0.8.dev4 → cgse_tools-2025.0.9}/src/cgse_tools/cgse_services.py +0 -0
- {cgse_tools-2025.0.8.dev4 → cgse_tools-2025.0.9}/src/egse/tools/status.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "cgse-tools"
|
|
3
|
-
version = "2025.0.
|
|
3
|
+
version = "2025.0.9"
|
|
4
4
|
description = "Tools for CGSE"
|
|
5
5
|
authors = [
|
|
6
6
|
{name = "IVS KU Leuven"}
|
|
@@ -38,6 +38,7 @@ cgse-tools = 'egse.tools'
|
|
|
38
38
|
[project.entry-points."cgse.command.plugins"]
|
|
39
39
|
init = 'cgse_tools.cgse_commands:init'
|
|
40
40
|
top = 'cgse_tools.cgse_commands:top'
|
|
41
|
+
clock = 'cgse_tools.cgse_clock:clock'
|
|
41
42
|
show = 'cgse_tools.cgse_commands:show[group]'
|
|
42
43
|
check = 'cgse_tools.cgse_commands:check[group]'
|
|
43
44
|
dev-x = 'cgse_tools.cgse_services:dev_x[group]'
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
3
|
+
import rich
|
|
4
|
+
import typer
|
|
5
|
+
from textual.app import App
|
|
6
|
+
from textual.app import ComposeResult
|
|
7
|
+
from textual.widgets import Digits
|
|
8
|
+
|
|
9
|
+
app = typer.Typer()
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ClockApp(App):
|
|
13
|
+
CSS = """
|
|
14
|
+
Screen {
|
|
15
|
+
align: center middle;
|
|
16
|
+
&:inline {
|
|
17
|
+
border: none;
|
|
18
|
+
height: 3;
|
|
19
|
+
Digits {
|
|
20
|
+
color: $success;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
#clock {
|
|
25
|
+
width: auto;
|
|
26
|
+
}
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
def compose(self) -> ComposeResult:
|
|
30
|
+
yield Digits("", id="clock")
|
|
31
|
+
|
|
32
|
+
def on_ready(self) -> None:
|
|
33
|
+
self.update_clock()
|
|
34
|
+
self.set_interval(1, self.update_clock)
|
|
35
|
+
|
|
36
|
+
def update_clock(self) -> None:
|
|
37
|
+
clock = datetime.now().time()
|
|
38
|
+
self.query_one(Digits).update(f"{clock:%T}")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@app.command()
|
|
42
|
+
def clock():
|
|
43
|
+
"""Showcase for running an in-line Textual App. """
|
|
44
|
+
|
|
45
|
+
ClockApp().run(inline=True)
|
|
46
|
+
|
|
47
|
+
rich.print("After in-line mode, you continue where you left off!")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|