Explorer
/proc/118/root/tmp/fix_cockpit_template.py
← Zurück ↓ Download
from pathlib import Path
p=Path('/opt/struktur/social-media-agent/templates/cockpit.html')
s=p.read_text()
s=s.replace('{{ signal.published_at or "unbekannt" }}','{{ s.published_at or "unbekannt" }}')
s=s.replace('{{ signal.observed_at or signal.created_at }}','{{ s.observed_at or s.created_at }}')
p.write_text(s)
p=Path('/opt/struktur/social-media-agent/app.py')
s=p.read_text()
s=s.replace('            " published_at, created_at"\n', '            " observed_at, published_at, created_at"\n', 1)
p.write_text(s)