chore(video): reeks en bron instelbaar in maak_video.py

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Guido van Dijk
2026-09-21 17:00:40 +02:00
parent e4d2364584
commit 79c8614f8c
+8 -3
View File
@@ -15,6 +15,8 @@ Opbouw van het script (regels die met [ beginnen zijn koppen, de rest is de gesp
# stem: nl-NL-FennaNeural
# tempo: -5%
# uitvoer: naam-zonder-extensie
# reeks: Reeks Copilot-agents voor school (kopregel op de titelkaart en in de voettekst)
# bron: git.lexconsultancy.nl/guido/copilot-handleidingen (op de slotkaart)
[titel] de titelkaart
[beeld: bestand.jpg] een schermafbeelding uit beelden/, met een label
[beeld: bestand.jpg | label]
@@ -39,6 +41,7 @@ HERE = Path(__file__).resolve().parent
LOGO_LAI = HERE / "logo-ai-netwerk-limburg.png"
LOGO_LEX = HERE / "logo-lex.png"
BRON = "git.lexconsultancy.nl/guido/copilot-handleidingen"
REEKS = "Reeks Copilot-agents voor school"
def font(size, bold=False):
@@ -74,7 +77,7 @@ def logos(img, dark):
def kaart_titel(titel, ondertitel, dest):
img = Image.new("RGB", (W, Hh), DARK); d = ImageDraw.Draw(img)
logos(img, True)
d.text((128, 300), "REEKS COPILOT-AGENTS VOOR SCHOOL", font=font(28, True), fill="#F4B183")
d.text((128, 300), REEKS.upper(), font=font(28, True), fill="#F4B183")
y = 360
for line in wrap(d, titel, font(88, True), 1300):
d.text((128, y), line, font=font(88, True), fill=LIGHT); y += 104
@@ -110,7 +113,7 @@ def kaart_tekst(kop, regels, dest):
for i, line in enumerate(wrap(d, r, font(40), 1520)):
d.text((200, y), ("• " if i == 0 else " ") + line, font=font(40), fill=BODY); y += 58
y += 18
d.text((160, Hh - 90), "Reeks Copilot-agents voor school · LeX Consultancy · CC BY-SA 4.0", font=font(24), fill="#8A8F98")
d.text((160, Hh - 90), REEKS + " · LeX Consultancy · CC BY-SA 4.0", font=font(24), fill="#8A8F98")
img.save(dest)
@@ -124,7 +127,7 @@ def kaart_beeld(pad, label, dest):
img.paste(shot, (x, y))
if label:
d.text((96, 44), label, font=font(34, True), fill=DARK)
d.text((96, Hh - 60), "Reeks Copilot-agents voor school · LeX Consultancy · CC BY-SA 4.0", font=font(22), fill="#8A8F98")
d.text((96, Hh - 60), REEKS + " · LeX Consultancy · CC BY-SA 4.0", font=font(22), fill="#8A8F98")
img.save(dest)
@@ -202,6 +205,8 @@ def main():
script = Path(sys.argv[1]).resolve()
map_ = script.parent
meta, segs = lees_script(script)
global BRON, REEKS
BRON = meta.get("bron", BRON); REEKS = meta.get("reeks", REEKS)
stem = meta.get("stem", "nl-NL-FennaNeural"); tempo = meta.get("tempo", "-5%")
naam = meta.get("uitvoer", script.stem.replace("video-script", "video"))
pauze = 0.8 # seconden stilte na elk segment