mirror of
https://github.com/daylinmorgan/task.mk.git
synced 2024-12-22 01:50:44 -06:00
fix: correct print-ansi typo and extra listings
This commit is contained in:
parent
76e9ecec9f
commit
bf0394c5e1
2 changed files with 32 additions and 5 deletions
|
@ -4,10 +4,24 @@
|
||||||
##- '$(utils_py)' -##
|
##- '$(utils_py)' -##
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
codes_names = {getattr(ansi, attr): attr for attr in ansi.__dict__}
|
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)):
|
for code in sorted(codes_names.keys(), key=lambda item: (len(item), item)):
|
||||||
sys.stderr.write(
|
sys.stderr.write(
|
||||||
f"{codes_names[code]:>20} {cfg.sep} {code+'*****'+ansi.end} {sep} {repr(code)}\n"
|
f"{codes_names[code]:>20} {cfg.sep} {code+'*****'+ansi.end} {cfg.sep} {repr(code)}\n"
|
||||||
)
|
)
|
||||||
|
|
||||||
#% endblock %#
|
#% endblock %#
|
||||||
|
|
19
task.mk
19
task.mk
|
@ -1,7 +1,7 @@
|
||||||
# }> [github.com/daylinmorgan/task.mk] <{ #
|
# }> [github.com/daylinmorgan/task.mk] <{ #
|
||||||
# Copyright (c) 2022 Daylin Morgan
|
# Copyright (c) 2022 Daylin Morgan
|
||||||
# MIT License
|
# MIT License
|
||||||
# version: v22.9.28-2-g6dad870-dev
|
# version: v22.9.28-3-g76e9ece-dev
|
||||||
#
|
#
|
||||||
# task.mk should be included at the bottom of your Makefile with `-include .task.mk`
|
# task.mk should be included at the bottom of your Makefile with `-include .task.mk`
|
||||||
# See below for the standard configuration options that should be set prior to including this file.
|
# See below for the standard configuration options that should be set prior to including this file.
|
||||||
|
@ -248,10 +248,23 @@ endef
|
||||||
define print_ansi_py
|
define print_ansi_py
|
||||||
$(utils_py)
|
$(utils_py)
|
||||||
import sys
|
import sys
|
||||||
codes_names = {getattr(ansi, attr): attr for attr in ansi.__dict__}
|
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)):
|
for code in sorted(codes_names.keys(), key=lambda item: (len(item), item)):
|
||||||
sys.stderr.write(
|
sys.stderr.write(
|
||||||
f"{codes_names[code]:>20} {cfg.sep} {code+'*****'+ansi.end} {sep} {repr(code)}\n"
|
f"{codes_names[code]:>20} {cfg.sep} {code+'*****'+ansi.end} {cfg.sep} {repr(code)}\n"
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
define vars_py
|
define vars_py
|
||||||
|
|
Loading…
Reference in a new issue