disko2: Add dev subcommand

This commit is contained in:
Felix Uhl committed 2024-10-30 20:24:00 +01:00
1 parent e825c64c8d
commit 5da578139e
3 files changed
+71 -23

No files matched your search

Executable → Regular
+6 -2
View File
@@ -3,7 +3,8 @@
# Inspired by rene-d's colors.py, published in 2018
# See https://gist.github.com/rene-d/9e584a7dd2935d0f461904b9f2950007
# Run as a script to see all available colors and styles
from typing import Any
class Colors:
@@ -177,9 +178,12 @@ class Colors:
del kernel32
if __name__ == "__main__":
def disko_dev_ansi() -> str:
import inspect
from lib.result import DiskoSuccess # Import here to avoid circular dependency
for name, value in inspect.getmembers(Colors):
if value != "_" and not name.startswith("_") and name != "RESET":
print("{:>30} {}".format(name, value + name + Colors.RESET))
return "run disko dev ansi"