def colorText(text: str, color: str) -> str: colors = { "red": "\033[91m", "green": "\033[92m", "yellow": "\033[93m", "blue": "\033[94m", "magenta": "\033[95m", "cyan": "\033[96m", "white": "\033[97m", "reset": "\033[0m" } return f"{colors.get(color, colors['reset'])}{text}{colors['reset']}" def style_dataframe_dark(df, output_html_path=None, overwrite=True): from datetime import datetime # Get current date and filename for subtitle today = datetime.now().strftime("%d %B %Y") # Changed to "Day Month Year" filename = output_html_path.replace('.html', '') if output_html_path else "Report" dark_css = """ """ header = f"""

Airlock Tools

{filename} - {today}

""" html_table = df.to_html(index=False, escape=False) styled_html = ( f"\n" f"Airlock Tools Report\n" f"\n" f"{dark_css}\n" f"{header}\n" f"
\n" f" {html_table}\n" f"
\n" f"\n" f"" ) if output_html_path: with open(output_html_path, "w", encoding="utf-8") as f: f.write(styled_html) print(f"✅ Styled table saved to '{output_html_path}'") elif overwrite: import tempfile temp_path = tempfile.mktemp(suffix=".html") with open(temp_path, "w", encoding="utf-8") as f: f.write(styled_html) print(f"✅ Styled table saved to temporary file: {temp_path}") else: return styled_html def displayIntro(): print(colorText(r""" ███ ████ ░████████ █████████████ ███████████████ █████████████████████ █████████████████████ ███████████████████ ██████████████████████▓ ███████████████████ ██████████████████████ █████████████████████ ███████████████████████ ████████████████████████████████████████████████████████ █████████ ██ ██ █████████ █████████ ██ ███ █ █████████ █████████ ██ ████ █████ █████████████ █████████ ██ ██████ █████████████ ████████ ██ ███████ ████████████░ ███████ ██ ██▓ ██████ ████████████ ██████ ██ ████ █████ ███████████ █████████████████████████████████████████████████ ▒████████████████████ ██████████████████ ███████████████████ ███████████████▒ ███████████████ █████████████ ██████████ ███████████ ████████ ████ """, "yellow")) print(colorText(r""" _____ .__ .__ __ ___________ .__ / _ \ |__|______| | ____ ____ | | __ \__ ___/___ ____ | | ______ / /_\ \| \_ __ \ | / _ \_/ ___\| |/ / | | / _ \ / _ \| | / ___/ / | \ || | \/ |_( <_> ) \___| < | |( <_> | <_> ) |__\___ \ \____|__ /__||__| |____/\____/ \___ >__|_ \ |____| \____/ \____/|____/____ > \/ \/ \/ \/ """, "cyan")) print(colorText("=================================================================================", "cyan")) print(colorText("======================== Welcome to the Airlock API Tool ========================", "cyan")) print(colorText("=================================================================================", "cyan")) def areYouSure(): print(colorText(f"*******************************************************************************************************************************************","red")) print(colorText(f"*=========================================================================================================================================*","yellow")) print(colorText(f"*=========================================================================================================================================*","red")) print(colorText(f"*-------------This program will now begin to make changes to the Airlock Console. Do you understand and agree to proceed? ----------------*", "yellow")) print(colorText(f"*=========================================================================================================================================*","red")) print(colorText(f"*=========================================================================================================================================*","yellow")) print(colorText(f"*******************************************************************************************************************************************","red")) def locked(): print(colorText(r""" ████████████████████████████████████████████████████████████████ ███ ██ ██ ██████ ███ ██ ████████████ ███ ██ ████ ███ ███ ██ ███ ███ ███ ██ ███ ███ ███ ██ ▒████████████████████ ███ ██ ██████████████████████ ███ ██ ██████████████████████ ███ ██ ██████████████████████ ███ ██ ██████████████████████ ███ ██ ██████████████████████ ███ ██ ███ ███ ███ ████████████████████████████████████████████████████████████████████ ▒██████████████████████████████████████████████████████████████████▒ ▒████ ▒████ ▓██████████████████████████████████████████ █████████████████████████████████████████████░ """, "yellow"))