This commit is contained in:
eric
2026-03-29 00:34:53 -05:00
parent e0b3ac43fc
commit af927c6dca
8 changed files with 1281 additions and 21 deletions

View File

@@ -2,8 +2,11 @@
from __future__ import annotations
import configparser
import io
from pathlib import Path
from src.config_governance import save_managed_file
def write_youtube_ini_stream_key(repo_root: Path, stream_key_or_url: str) -> str:
root = repo_root.resolve()
@@ -19,6 +22,7 @@ def write_youtube_ini_stream_key(repo_root: Path, stream_key_or_url: str) -> str
if not parser.has_section("youtube"):
parser.add_section("youtube")
parser.set("youtube", "key", value)
with cfg_path.open("w", encoding="utf-8") as fh:
parser.write(fh)
buf = io.StringIO()
parser.write(buf)
save_managed_file("app-config", "youtube.ini", buf.getvalue())
return f"wrote {cfg_path}"