3This is a collection of scripts that use [
ANSI escape codes](
https://stackoverflow.com/a/5947802/1558022) to print coloured messages to the terminal.
5I have them saved as individual shell scripts so I can call them from any of my other scripts.
7## The individual scripts
11# This adds the root of the repo to the PATH, which has cog_helpers.py
12from os.path import abspath, dirname
15sys.path.append(abspath(dirname(dirname("."))))
23 "usage": "print_error [MESSAGE]",
25 print an error message in red and to stdout
29 "usage": "print_info [MESSAGE]",
31 print an info message in blue
35 "usage": "print_success [MESSAGE]",
37 print a success message in green
41 "usage": "print_warning [MESSAGE]",
43 print a warning message in yellow
48cog_helpers.create_description_table(folder_name=folder_name, scripts=scripts)
53 <a href="https://github.com/alexwlchan/scripts/blob/main/debug/print_error">
54 <code>print_error [MESSAGE]</code>
58 print an error message in red and to stdout
62 <a href="https://github.com/alexwlchan/scripts/blob/main/debug/print_info">
63 <code>print_info [MESSAGE]</code>
67 print an info message in blue
71 <a href="https://github.com/alexwlchan/scripts/blob/main/debug/print_success">
72 <code>print_success [MESSAGE]</code>
76 print a success message in green
80 <a href="https://github.com/alexwlchan/scripts/blob/main/debug/print_warning">
81 <code>print_warning [MESSAGE]</code>
85 print a warning message in yellow
88<!-- [[[end]]] (sum: b8iS/LTHw2) -->