-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui_test.py
More file actions
165 lines (141 loc) · 6.3 KB
/
ui_test.py
File metadata and controls
165 lines (141 loc) · 6.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#!/usr/bin/env python3
"""
DEVORUN: Oracle Radar
UI Mockup — uses the Rich library for a full terminal dashboard.
Runs a live 10-second animation where the ZachXBT CRITICAL alert flashes.
Press Ctrl+C to exit early.
"""
import time
from rich.align import Align
from rich.console import Console
from rich.layout import Layout
from rich.live import Live
from rich.panel import Panel
from rich.table import Table
from rich.text import Text
console = Console()
# ── Palette ───────────────────────────────────────────────────────────────────
NEON_PURPLE = "bold bright_magenta"
NEON_BLUE = "bright_blue"
NEON_GREEN = "bright_green"
NEON_RED = "bold bright_red"
# ── Header ────────────────────────────────────────────────────────────────────
def build_header() -> Panel:
title = Text("D E V O R U N O R A C L E", style=NEON_PURPLE, justify="center")
return Panel(
Align.center(title, vertical="middle"),
style=NEON_BLUE,
height=3,
)
# ── Main Table ────────────────────────────────────────────────────────────────
def build_table(alert_on: bool = True) -> Panel:
table = Table(
border_style=NEON_BLUE,
header_style=f"bold {NEON_BLUE}",
show_header=True,
expand=True,
padding=(0, 1),
show_lines=True,
)
table.add_column("[TIME]", style=NEON_GREEN, no_wrap=True, min_width=10)
table.add_column("[SOURCE]", style=NEON_GREEN, no_wrap=True, min_width=14)
table.add_column("[CONTENT]", style=NEON_GREEN, ratio=4)
table.add_column("[SIGNAL]", style=NEON_GREEN, no_wrap=True, min_width=16, justify="center")
# ── Row 1 : @zachxbt — RED ALERT (flashing) ──────────────────────────────
alert_style = NEON_RED if alert_on else "red"
signal_style = "bold bright_red" if alert_on else "bold dark_red"
table.add_row(
Text("09:42:11", style=alert_style),
Text("@zachxbt", style=alert_style),
Text(
"Potential rug pull detected on $DEVORUN — on-chain evidence "
"linked to known exploiter wallets. Advise immediate caution.",
style=alert_style,
),
Text("🚨 CRITICAL", style=signal_style),
)
# ── Row 2 : @zoomerfied ──────────────────────────────────────────────────
table.add_row(
Text("09:43:05", style=NEON_GREEN),
Text("@zoomerfied", style=NEON_GREEN),
Text(
"The meta is shifting — devs who ship daily win the cycle. "
"$DEVORUN looking like a serious sleeper 👀",
style=NEON_GREEN,
),
Text("⚡ ALERT", style="bold yellow"),
)
# ── Row 3 : @elonmusk ────────────────────────────────────────────────────
table.add_row(
Text("09:44:20", style=NEON_GREEN),
Text("@elonmusk", style=NEON_GREEN),
Text(
"To the moon 🚀 … or not. The oracle knows what the charts won't tell you.",
style=NEON_GREEN,
),
Text("📡 MONITOR", style="bold cyan"),
)
# ── Row 4 : @Devran1An ───────────────────────────────────────────────────
table.add_row(
Text("09:45:00", style=NEON_GREEN),
Text("@Devran1An", style=NEON_GREEN),
Text(
"DEVORUN ORACLE RADAR is live — watching every signal, every move. "
"Nothing escapes the grid. 🔍",
style=NEON_GREEN,
),
Text("✅ NOMINAL", style="bold bright_green"),
)
return Panel(
table,
style=NEON_BLUE,
title="[bold bright_blue][ LIVE SIGNAL FEED ][/bold bright_blue]",
title_align="left",
subtitle="[bright_blue][ oracle v0.1 ][/bright_blue]",
subtitle_align="right",
)
# ── Footer ────────────────────────────────────────────────────────────────────
def build_footer() -> Panel:
text = Text(
"OPERATOR: DEVRAN1AN | SYSTEM: ACTIVE | MONITORING 4 TARGETS",
style=f"bold {NEON_GREEN}",
justify="center",
)
return Panel(
Align.center(text, vertical="middle"),
style=NEON_BLUE,
height=3,
)
# ── Layout composer ───────────────────────────────────────────────────────────
def build_layout(alert_on: bool = True) -> Layout:
layout = Layout()
layout.split_column(
Layout(name="header", size=3),
Layout(name="main"),
Layout(name="footer", size=3),
)
layout["header"].update(build_header())
layout["main"].update(build_table(alert_on=alert_on))
layout["footer"].update(build_footer())
return layout
# ── Entry point ───────────────────────────────────────────────────────────────
def main() -> None:
flash = True
try:
with Live(
build_layout(flash),
refresh_per_second=2,
screen=True,
) as live:
for _ in range(30): # ~15 seconds of animation (0.5s per tick)
time.sleep(0.5)
flash = not flash
live.update(build_layout(flash))
except KeyboardInterrupt:
pass
finally:
console.print(
"\n[bold bright_magenta]DEVORUN ORACLE — session terminated.[/bold bright_magenta]\n"
)
if __name__ == "__main__":
main()