Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions python/vectorprime/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@

import argparse
import sys
import os


def _print_logo() -> None:
"""Print the Optimus Prime ASCII art logo from assets."""
try:
# Get the path to the logo file relative to this module
# cli.py is at: /home/daniel/VectorPrime/python/vectorprime/cli.py
# We need to go up 2 levels to get: /home/daniel/VectorPrime/
current_dir = os.path.dirname(os.path.abspath(__file__)) # vectorprime/
package_dir = os.path.dirname(current_dir) # python/
project_root = os.path.dirname(package_dir) # VectorPrime/
logo_path = os.path.join(project_root, "assets", "optimus_prime_logo.txt")

if os.path.exists(logo_path):
with open(logo_path, "r", encoding="utf-8") as f:
logo_content = f.read()
print(logo_content)
except Exception as e:
# Silently fail if logo cannot be loaded
pass


def _print_fancy_header() -> None:
"""Print fancy VectorPrime header with styling."""
# Print fancy VectorPrime text with colors
print("""
██ ██ ██████ ▄█████ ██████ ▄████▄ █████▄ █████▄ █████▄ ██ ██▄ ▄██ ██████
██▄▄██ ██▄▄ ██ ██ ██ ██ ██▄▄██▄ ██▄▄█▀ ██▄▄██▄ ██ ██ ▀▀ ██ ██▄▄
▀██▀ ██▄▄▄▄ ▀█████ ██ ▀████▀ ██ ██ ██ ██ ██ ██ ██ ██ ██▄▄▄▄
""")
# Print logo
_print_logo()
print()
sys.stdout.flush() # Force output to display immediately


def detect_format(path: str) -> str:
Expand Down Expand Up @@ -310,6 +345,9 @@ def build_parser() -> argparse.ArgumentParser:


def main() -> None:
# Display fancy header with logo
_print_fancy_header()

parser = build_parser()
args = parser.parse_args()

Expand Down
5 changes: 5 additions & 0 deletions python/vectorprime/logo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
██ ██ ███████ ██████ ████████ ██████ ██████ ██████ ██████ ██ ███ ███ ███████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ████ ██
██ ██ █████ ██ ██ ██ ██ ██████ ██████ ██████ ██ ██ ████ ██ █████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
████ ███████ ██████ ██ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ███████
Loading