Skip to content

Commit ce246c7

Browse files
committed
[morse] updated to use rich progress bar
1 parent 1efb7f4 commit ce246c7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/instrumentman/morse/app.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from time import sleep
22
from typing import Callable, Any
33

4-
from click_extra import progressbar
4+
from rich.progress import Progress, TextColumn, BarColumn, TaskProgressColumn
55

66
from geocompy.geo import GeoCom
77
from geocompy.communication import open_serial
@@ -90,12 +90,12 @@ def relay_message(
9090
unittime: float
9191
) -> None:
9292
encoded = encode_message(message)
93-
with progressbar(
94-
encoded,
95-
label="Relaying message",
96-
show_eta=False
97-
) as stream:
98-
for char in stream:
93+
with Progress(
94+
TextColumn("[progress.description]{task.description}"),
95+
BarColumn(),
96+
TaskProgressColumn()
97+
) as progress:
98+
for char in progress.track(encoded, description="Relaying message"):
9999
match char:
100100
case ".":
101101
beepstart()

0 commit comments

Comments
 (0)