Publish showcase.py from marimo
Browse files- showcase.py +3 -1
showcase.py
CHANGED
|
@@ -23,11 +23,13 @@ from showcase_core import (
|
|
| 23 |
def main(argv: list[str] | None = None) -> int:
|
| 24 |
args = list(argv if argv is not None else sys.argv[1:])
|
| 25 |
only = args[args.index("--only") + 1] if "--only" in args else None
|
|
|
|
| 26 |
if "--card" in args:
|
| 27 |
print("card section written:", write_card(_read_index()).name)
|
| 28 |
return 0
|
| 29 |
display = ensure_display()
|
| 30 |
-
picked = [s for s in CATALOG
|
|
|
|
| 31 |
print(f"display: {display} | {len(picked)}/{len(CATALOG)} capabilities")
|
| 32 |
if "--list" in args:
|
| 33 |
for s in picked:
|
|
|
|
| 23 |
def main(argv: list[str] | None = None) -> int:
|
| 24 |
args = list(argv if argv is not None else sys.argv[1:])
|
| 25 |
only = args[args.index("--only") + 1] if "--only" in args else None
|
| 26 |
+
wanted = (args[args.index("--ids") + 1].split(",") if "--ids" in args else None)
|
| 27 |
if "--card" in args:
|
| 28 |
print("card section written:", write_card(_read_index()).name)
|
| 29 |
return 0
|
| 30 |
display = ensure_display()
|
| 31 |
+
picked = [s for s in CATALOG
|
| 32 |
+
if (s.id in wanted if wanted else (not only or only.lower() in s.id.lower()))]
|
| 33 |
print(f"display: {display} | {len(picked)}/{len(CATALOG)} capabilities")
|
| 34 |
if "--list" in args:
|
| 35 |
for s in picked:
|