Explorer
/tmp/aa045f5_patch_runradar.py
← Zurück ↓ Download
"""AA-045-F5: run_radar.sh um Watch-Entity-Intake erweitern."""
p = "/opt/struktur/social-media-radar/run_radar.sh"
s = open(p).read()

old = '''# Report erzeugen und speichern
python3 radar.py --report >> "$REPORT_FILE" 2>&1
REPORT_STATUS=$?'''
new = '''# AA-045-F5: Branchen-Watchlist (rotierend, nur verified+active Entities)
python3 intake/watch_intake.py >> "$LOG_FILE" 2>&1 || echo "[RADAR] WARNUNG: Watch-Intake fehlgeschlagen" >> "$LOG_FILE"

# Report erzeugen und speichern
python3 radar.py --report >> "$REPORT_FILE" 2>&1
REPORT_STATUS=$?'''
assert old in s, "anchor fehlt"
s = s.replace(old, new)
open(p, "w").write(s)
print("run_radar.sh gepatcht")