Skip to content

Enhanced terminal

Arto Steffan edited this page Sep 1, 2023 · 5 revisions

The Enhanced terminal scripts allow you to get colored text and headers in the terminal.

How to

To color or modify a string, just concatenate an bcolor.PARAM in the string! We can also use the header functions to organise the terminal output.

๐ŸŽ‰ Coloring

We have the classe bcolors with differents parameters :

Colors:

  • PURPLE
  • OKBLUE
  • OKCYAN
  • OKGREEN
  • WARNING
  • FAIL

Text:

  • BOLD
  • UNDERLINE

To reset the text back to the normal we use ENDC.

๐Ÿ“‘ Headers

You can use the functions print_title(str) to print a title and print_category(str) to print a specific category.

print_title("Title Exemple") gives:

 _.-**Title Exemple**-._

print_category("Category Exemple") gives:

 -----[Category Exemple]-----

and is randomely colored.

Clone this wiki locally