From f79b8b5d4d93c8d3c9a1d7d6ff2117055eb9803e Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 1 Aug 2024 12:58:16 +0200 Subject: [PATCH] add tee thing --- src/tui/requirements.txt | 1 + src/tui/tee.py | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 src/tui/requirements.txt create mode 100644 src/tui/tee.py diff --git a/src/tui/requirements.txt b/src/tui/requirements.txt new file mode 100644 index 0000000..164e8ce --- /dev/null +++ b/src/tui/requirements.txt @@ -0,0 +1 @@ +terminaltexteffects==0.11.0 diff --git a/src/tui/tee.py b/src/tui/tee.py new file mode 100644 index 0000000..cd65e1f --- /dev/null +++ b/src/tui/tee.py @@ -0,0 +1,20 @@ +from terminaltexteffects.effects.effect_burn import Burn +text = """ +Beautiful is better than ugly. +Explicit is better than implicit. +Beautiful is better than ugly. +Beautiful is better than ugly. +Beautiful is better than ugly. +Beautiful is better than ugly. +Beautiful is better than ugly. +Explicit is better than implicit. +Explicit is better than implicit. +Explicit is better than implicit. +Explicit is better than implicit. +Explicit is better than implicit. +""" +effect = Burn(text) +with effect.terminal_output() as terminal: + for frame in effect: + terminal.print(frame) +