Explorer
/tmp/disable_bbs.py
← Zurück ↓ Download
from pathlib import Path
p=Path('/opt/struktur/social-media-radar/watch_entities.yaml')
s=p.read_text()
old='''- active: true
  aliases:
  - bbs-mgmt
  canonical_name: BBS Management Mallorca
  entity_id: bbs_management_mallorca
'''
new='''- active: false
  aliases:
  - bbs-mgmt
  canonical_name: BBS Management Mallorca
  entity_id: bbs_management_mallorca
  disabled_reason: "Keine belastbare Website/CMS/Feed- oder Facebook-Ausgabe im Volltest; dauerhaft 0/Fehler."
'''
assert old in s
p.write_text(s.replace(old,new,1))