feat: add typer & new command

Signed-off-by: Konstantin Fickel <mail@konstantinfickel.de>
This commit is contained in:
Konstantin Fickel 2025-06-22 14:13:27 +02:00
parent e826101a24
commit 87be5c22a2
Signed by: kfickel
GPG key ID: A793722F9933C1A5
5 changed files with 248 additions and 94 deletions

View file

@ -0,0 +1,15 @@
from streamer.parse.shard import Shard
def find_by_markers(shard: Shard, has: list[str], has_not: list[str]) -> list[Shard]:
found_shards = []
if any(tag in has for tag in shard.markers) and not any(
tag in has_not for tag in shard.markers
):
found_shards.append(shard)
for child in shard.children:
found_shards.extend(find_by_markers(child, has, has_not))
return found_shards