-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathterminal.py
More file actions
24 lines (22 loc) · 817 Bytes
/
terminal.py
File metadata and controls
24 lines (22 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import pyfiglet
from tqdm import tqdm
from rich.console import Console
from rich.progress import track
import time
# ---------- 1. ASCII Art ----------
ascii_banner = pyfiglet.figlet_format("Nishkarsh!")
print(ascii_banner)
# ---------- 2. TQDM Progress Bar ----------
print("\n[1] Loading with tqdm:")
for _ in tqdm(range(50), desc="Loading..."):
time.sleep(0.02)
# ---------- 3. Rich Progress Bar ----------
console = Console()
print("\n[2] Fancy Progress with Rich:")
for step in track(range(10), description="Processing tasks..."):
time.sleep(0.1)
# ---------- 4. Rich Spinner / Status ----------
print("\n[3] Animated Spinner with Rich:")
with console.status("[bold green]Finalizing magic..."):
time.sleep(2)
console.print("\n[bold cyan]All done! Your terminal is now beautiful. 🌈[/bold cyan]")