Last active
February 10, 2025 16:01
-
-
Save jnewbery/0de8fe3c2f1b21cd242e866bed14a384 to your computer and use it in GitHub Desktop.
axle_dance.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /// script | |
# requires-python = ">=3.11" | |
# dependencies = [ | |
# "rich", | |
# ] | |
# /// | |
import time | |
import os | |
from rich.console import Console | |
from rich.text import Text | |
console = Console() | |
# Define the four frames of the axolotl animation with sparkly effects | |
frames = [ | |
""" | |
[bold magenta]✨ AXLE ✨[/bold magenta] | |
(o~o) | |
<( )> | |
^^ ^^ | |
""", | |
""" | |
[bold cyan]✨ AXLE ✨[/bold cyan] | |
(o~o) | |
<( )> | |
^^ ^^ | |
""", | |
""" | |
[bold yellow]✨ AXLE ✨[/bold yellow] | |
(o~o) | |
<( )> | |
^^ ^^ | |
""", | |
""" | |
[bold green]✨ AXLE ✨[/bold green] | |
(o~o) | |
<( )> | |
^^ ^^ | |
""", | |
] | |
# Loop through the frames to create an animation effect | |
while True: | |
for frame in frames: | |
os.system("clear" if os.name == "posix" else "cls") # Clear the screen | |
console.print(Text.from_markup(frame)) | |
time.sleep(0.3) # Delay between frames |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment