Schritt 6: Automatische Filter mit Vorschau

- app/filters.py: Speed <= X, Speed negativ, Bild/JSON fehlt/kaputt,
  0°-Ausreisser in Kurven, Unscharf (Laplace-Schärfe relativ zu den
  Nachbarn, weil glatte Wände sonst als unscharf gelten)
- app/filter_panel.py: Panel mit Häkchen, Werten, Trefferzahlen,
  Springen zwischen Treffern und „Treffer löschen“
- app/viewer.py: Panel mit F oder Knopf, Vorschau violett in den Kurven
  und im Bild, N / Shift+N springt zu Treffern, Schärfe in der Infozeile
- app/overlay.py: violetter Rahmen für Filter-Treffer, Text passt sich an
- app/deletions.py: bereinigung.json kompakter (eine Zeile pro Aufnahme)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 22:02:07 +01:00
parent a18c6ecb8c
commit e4936e0c24
5 changed files with 402 additions and 16 deletions
+3 -1
View File
@@ -115,7 +115,9 @@ class DeletionList:
by_recording: dict[str, list[list[int]]] = {}
for recording, group in groupby(sorted(self.keys), key=lambda k: k[0]):
by_recording[recording] = [list(r) for r in to_ranges([n for _, n in group])]
text = json.dumps({"version": 1, "geloescht": by_recording}, indent=2)
# Eine Zeile pro Aufnahme, z.B. "7": [[0, 5], [200, 234]] (lesbarer als json.dumps mit indent)
lines = [f" {json.dumps(rec)}: {json.dumps(ranges)}" for rec, ranges in by_recording.items()]
text = '{\n "version": 1,\n "geloescht": {\n' + ",\n".join(lines) + "\n }\n}\n"
# Erst in eine Hilfsdatei schreiben, dann umbenennen: So ist die Datei
# nie halb geschrieben, auch wenn das Programm mittendrin abstürzt.
tmp = self.path.with_name(self.path.name + ".tmp")