Created
April 13, 2026 14:16
-
-
Save showyou/2794b330a55c7ec4b6fee03b751b6d30 to your computer and use it in GitHub Desktop.
xxx
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
| import sys | |
| import pyfiglet | |
| CYAN = "\033[96m" | |
| RESET = "\033[0m" | |
| BOLD = "\033[1m" | |
| CLEAR = "\033[2J\033[H" | |
| def render(text: str) -> list[str]: | |
| art = pyfiglet.figlet_format(text, font="ansi_shadow", width=300) | |
| # 末尾の空行を除去 | |
| lines = art.splitlines() | |
| while lines and not lines[-1].strip(): | |
| lines.pop() | |
| return lines | |
| def print_rows(rows: list[str], row_delay: float = 0.10) -> None: | |
| for row in rows: | |
| print(f"{BOLD}\033[97m# {row}{RESET}") | |
| sys.stdout.flush() | |
| time.sleep(row_delay) | |
| def animated_line(prefix: str, suffix: str, dot_delay: float = 0.35) -> None: | |
| """prefix を出力後、. を1つずつ表示し、最後に suffix を出す""" | |
| sys.stdout.write(prefix) | |
| sys.stdout.flush() | |
| for _ in range(3): | |
| time.sleep(dot_delay) | |
| sys.stdout.write(".") | |
| sys.stdout.flush() | |
| time.sleep(dot_delay) | |
| sys.stdout.write(suffix + "\n") | |
| sys.stdout.flush() | |
| time.sleep(dot_delay) | |
| def boot_header() -> None: | |
| animated_line("[link] handshake", " OK") | |
| animated_line("[link] latency window", " calibrated") | |
| animated_line("[mod ] enable traceless-mode", " OK") | |
| animated_line("[mod ] hook audit-channel", " muted") | |
| time.sleep(0.2) | |
| print("ALEV1@STR4YL1GHT:~$ sn_gularity_console --run") | |
| print() | |
| sys.stdout.flush() | |
| def main() -> None: | |
| print(CLEAR, end="") | |
| boot_header() | |
| words = ["STRAYLIGHT", "S/NGL4RITY"] | |
| for i, word in enumerate(words): | |
| rows = render(word) | |
| print_rows(rows, row_delay=0.10) | |
| if i < len(words) - 1: | |
| print(f"{BOLD}\033[97m#\033[0m") # 単語間の空行 | |
| time.sleep(0.4) | |
| print() | |
| print(">> system ready.") | |
| print() | |
| if __name__ == "__main__": | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment