diff --git a/ppw15b/__init__.py b/ppw15b/__init__.py new file mode 100644 index 0000000..37af179 --- /dev/null +++ b/ppw15b/__init__.py @@ -0,0 +1,98 @@ +#!/usr/bin/python +import subprocess +import os.path +from renderlib import * + +# URL to Schedule-XML +scheduleUrl = 'https://frab.sendegate.de/de/ppw15b/public/schedule.xml' + +def easeOutCubic(t, b, c, d): + t=float(t)/d-1 + return c*((t)*t*t + 1) + b + +def introFrames(parameters): + # 1 Sekunden stehen bleiben + frames = 1*fps + for i in range(0, frames): + yield ( + ('logo', 'style', 'opacity', "1"), + ('flowRoot3405', 'style', 'opacity', "0.0") + ) + + # 2 Sekunden Fade-in + frames = 2*fps + for i in range(0, frames): + yield ( + ('logo', 'style', 'opacity', "1"), + ('flowRoot3405', 'style', 'opacity', "%.4f" % easeOutCubic(i, 0, 1, frames)), + ) + + # 5 Sekunden stehen bleiben + frames = 5*fps + for i in range(0, frames): + yield () + +def outroFrames(parameters): + frames = 5*fps + for i in range(0, frames): + yield () + +def pauseFrames(parameters): + frames = 5*fps + for i in range(0, frames): + yield () + +def debug(): + render( + 'intro.svg', + '../intro.dv', + introFrames, + { + '$title': "Podcasten aus dem Bundestag – die Entstehung eines politischen Formats", + '$subtitle': 'Alles über Technische Aufklärung', + '$personnames': 'Felix Betzin, Jonas Schönfelder' + } + ) + + render( + 'outro.svg', + '../outro.dv', + outroFrames + ) + + render( + 'pause.svg', + '../pause.dv', + pauseFrames + ) + +def tasks(queue, parameters): + # iterate over all events extracted from the schedule xml-export + for event in events(scheduleUrl): + # HACK: only render event 49 + #if event['id'] != 49: + # continue + + # generate a task description and put it into the queue + queue.put(Rendertask( + infile = 'intro.svg', + outfile = str(event['id']) + ".dv", + sequence = introFrames, + parameters = { + '$title': event['title'], + '$subtitle': event['subtitle'], + '$personnames': event['personnames'] + } + )) + + queue.put(Rendertask( + infile = 'outro.svg', + outfile = 'outro.dv', + sequence = outroFrames + )) + + queue.put(Rendertask( + infile = 'pause.svg', + outfile = 'pause.dv', + sequence = pauseFrames + )) diff --git a/ppw15b/artwork/fonts/Roboto-Bold.ttf b/ppw15b/artwork/fonts/Roboto-Bold.ttf new file mode 100755 index 0000000..aaf374d Binary files /dev/null and b/ppw15b/artwork/fonts/Roboto-Bold.ttf differ diff --git a/ppw15b/artwork/fonts/Roboto-Italic.ttf b/ppw15b/artwork/fonts/Roboto-Italic.ttf new file mode 100755 index 0000000..f382c68 Binary files /dev/null and b/ppw15b/artwork/fonts/Roboto-Italic.ttf differ diff --git a/ppw15b/artwork/fonts/Roboto-Light.ttf b/ppw15b/artwork/fonts/Roboto-Light.ttf new file mode 100755 index 0000000..664e1b2 Binary files /dev/null and b/ppw15b/artwork/fonts/Roboto-Light.ttf differ diff --git a/ppw15b/artwork/intro.svg b/ppw15b/artwork/intro.svg new file mode 100644 index 0000000..eff89e3 --- /dev/null +++ b/ppw15b/artwork/intro.svg @@ -0,0 +1,232 @@ + + + +image/svg+xml$title.................$subtitle...............$personnames \ No newline at end of file diff --git a/ppw15b/artwork/outro.svg b/ppw15b/artwork/outro.svg new file mode 100644 index 0000000..a4c0fc9 --- /dev/null +++ b/ppw15b/artwork/outro.svg @@ -0,0 +1,1011 @@ + + + +image/svg+xmlVIDEOAUDIO ENHANCED BYVIDEOc3voc.deCC BY 3.0https://creativecommons.org/licenses/by/3.0/ \ No newline at end of file diff --git a/ppw15b/artwork/pause.svg b/ppw15b/artwork/pause.svg new file mode 100644 index 0000000..9e6b609 --- /dev/null +++ b/ppw15b/artwork/pause.svg @@ -0,0 +1,235 @@ + + + +image/svg+xmlPause...Geht gleich weiter! \ No newline at end of file