Stand vor Protokollumbau

This commit is contained in:
2026-03-01 11:11:56 +01:00
parent c914333236
commit 4d88194f7d
17 changed files with 624 additions and 79 deletions

View File

@@ -3,7 +3,7 @@ import argparse
import sys
from core.config import load_config
from core.connection import BuzzerConnection, BuzzerError
from core.commands import info, ls, put, mkdir, rm, confirm, reboot, play, check
from core.commands import info, ls, put, mkdir, rm, confirm, reboot, play, check, get_tag
def main():
parser = argparse.ArgumentParser(description="Edis Buzzer Host Tool")
@@ -52,6 +52,10 @@ def main():
# Befehl: reboot
reboot_parser = subparsers.add_parser("reboot", help="Startet den Buzzer neu")
# Befehl: get_tag
get_tag_parser = subparsers.add_parser("get_tag", help="Holt die Tags einer Datei")
get_tag_parser.add_argument("path", type=str, help="Pfad der Datei (z.B. /lfs/a/neu)")
# Argumente parsen
args = parser.parse_args()
config = load_config(args)
@@ -105,6 +109,14 @@ def main():
print(f"CRC32 von '{args.path}': 0x{CRC32['crc32']:08x}")
else:
print(f"Fehler: Keine CRC32-Information für '{args.path}' erhalten.")
elif args.command == "get_tag":
tags = get_tag.execute(conn, path=args.path)
if tags:
print(f"Tags von '{args.path}':")
for key, value in tags.items():
print(f" {key}: {value}")
else:
print(f"Fehler: Keine Tags für '{args.path}' erhalten.")
elif args.command == "info" or args.command is None:
# Wurde kein Befehl oder explizit 'info' angegeben, sind wir hier schon fertig
pass