Skip to content

Instantly share code, notes, and snippets.

@DavePvZ
Created November 1, 2022 16:26
Show Gist options
  • Save DavePvZ/672d03691482b767faa5b65d0be3e1af to your computer and use it in GitHub Desktop.
Save DavePvZ/672d03691482b767faa5b65d0be3e1af to your computer and use it in GitHub Desktop.
import sys
def main(sys_argv):
# ┌─────────────────────┐ | ╔═════════════════════╗
# │ │ | ║ ║
# │ │ | ║ ║
# │ │ | ║ ║
# │ │ | ║ ║
# └─────────┬─┬─────────┘ | ╚═════════╦═╦═════════╝
# │ │ | ║ ║
# │ │ | ║ ║
# │ │ | ║ ║
# └─┘ | ╚═╝
double_lined = "-d" in sys_argv
if double_lined:
del sys_argv[sys_argv.index("-d")]
for _ in range(len(sys_argv), 4):
sys_argv += [""]
print(f"""╔═════════════════════╗
║{sys_argv[0]:^21}║
║{sys_argv[1]:^21}║
║{sys_argv[2]:^21}║
║{sys_argv[3]:^21}║
╚═════════╦═╦═════════╝
║ ║
║ ║
║ ║
╚═╝""")
return 0
for _ in range(len(sys_argv), 4):
sys_argv += [""]
print(f"""┌─────────────────────┐
│{sys_argv[0]:^21}│
│{sys_argv[1]:^21}│
│{sys_argv[2]:^21}│
│{sys_argv[3]:^21}│
└─────────┬─┬─────────┘
│ │
│ │
│ │
└─┘""")
if __name__ == "__main__":
main(sys.argv[1:])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment