mirror of
https://github.com/daylinmorgan/task.mk.git
synced 2024-11-12 20:23:15 -06:00
27 lines
571 B
Python
27 lines
571 B
Python
#% extends "py-script.mk" %#
|
|
#% block name %#print_ansi#% endblock %#
|
|
#% block script %#
|
|
##- '$(utils_py)' -##
|
|
import sys
|
|
|
|
codes_names = {
|
|
getattr(ansi, attr): attr
|
|
for attr in ansi.__dict__
|
|
if attr
|
|
not in [
|
|
"target",
|
|
"header",
|
|
"accent",
|
|
"params",
|
|
"goal",
|
|
"msg",
|
|
"div_style",
|
|
]
|
|
}
|
|
|
|
for code in sorted(codes_names.keys(), key=lambda item: (len(item), item)):
|
|
sys.stderr.write(
|
|
f"{codes_names[code]:>20} {cfg.sep} {code+'*****'+ansi.end} {cfg.sep} {repr(code)}\n"
|
|
)
|
|
|
|
#% endblock %#
|