Center banner text dynamically
This commit is contained in:
parent
f86ae6df0a
commit
f417118e27
3 changed files with 36 additions and 24 deletions
|
|
@ -175,12 +175,24 @@ def display_splash_screen(args: argparse.Namespace) -> None:
|
||||||
args: Parsed command line arguments
|
args: Parsed command line arguments
|
||||||
"""
|
"""
|
||||||
# Banner
|
# Banner
|
||||||
ASCIIColors.cyan(f"""
|
# Banner
|
||||||
╔══════════════════════════════════════════════════════════════╗
|
top_border = "╔══════════════════════════════════════════════════════════════╗"
|
||||||
║ 🚀 LightRAG Server v{core_version}/{api_version} ║
|
bottom_border = "╚══════════════════════════════════════════════════════════════╝"
|
||||||
║ Fast, Lightweight RAG Server Implementation ║
|
width = len(top_border) - 4 # width inside the borders
|
||||||
╚══════════════════════════════════════════════════════════════╝
|
|
||||||
""")
|
line1_text = f"LightRAG Server v{core_version}/{api_version}"
|
||||||
|
line2_text = "Fast, Lightweight RAG Server Implementation"
|
||||||
|
|
||||||
|
line1 = f"║ {line1_text.center(width)} ║"
|
||||||
|
line2 = f"║ {line2_text.center(width)} ║"
|
||||||
|
|
||||||
|
banner = f"""
|
||||||
|
{top_border}
|
||||||
|
{line1}
|
||||||
|
{line2}
|
||||||
|
{bottom_border}
|
||||||
|
"""
|
||||||
|
ASCIIColors.cyan(banner)
|
||||||
|
|
||||||
# Server Configuration
|
# Server Configuration
|
||||||
ASCIIColors.magenta("\n📡 Server Configuration:")
|
ASCIIColors.magenta("\n📡 Server Configuration:")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue