2022-09-05 12:23:17 -05:00
|
|
|
#% extends "py-script.mk" %#
|
2022-09-05 17:44:39 -05:00
|
|
|
#% block name %#print_ansi#% endblock %#
|
2022-09-05 12:23:17 -05:00
|
|
|
#% block script %#
|
2022-09-24 16:20:23 -05:00
|
|
|
##- '$(utils_py)' -##
|
2022-10-12 16:38:41 -05:00
|
|
|
import sys
|
|
|
|
|
2022-11-21 12:36:43 -06:00
|
|
|
codes_names = {
|
|
|
|
getattr(ansi, attr): attr
|
|
|
|
for attr in ansi.__dict__
|
|
|
|
if attr
|
|
|
|
not in [
|
|
|
|
"target",
|
|
|
|
"header",
|
|
|
|
"accent",
|
|
|
|
"params",
|
|
|
|
"goal",
|
|
|
|
"msg",
|
|
|
|
"div_style",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2022-09-05 12:23:17 -05:00
|
|
|
for code in sorted(codes_names.keys(), key=lambda item: (len(item), item)):
|
2022-10-12 16:38:41 -05:00
|
|
|
sys.stderr.write(
|
2022-11-21 12:36:43 -06:00
|
|
|
f"{codes_names[code]:>20} {cfg.sep} {code+'*****'+ansi.end} {cfg.sep} {repr(code)}\n"
|
2022-10-12 16:38:41 -05:00
|
|
|
)
|
2022-09-05 12:23:17 -05:00
|
|
|
|
|
|
|
#% endblock %#
|