diff --git a/pwb18/__init__.py b/pwb18/__init__.py new file mode 100644 index 0000000..93ccaea --- /dev/null +++ b/pwb18/__init__.py @@ -0,0 +1,93 @@ +#!/usr/bin/python + +from renderlib import * +from easing import * + +# URL to Schedule-XML +scheduleUrl = 'https://datenschutzgrundversorgung.at/pwb18/schedule.xml' + +def bounce(i, min, max, frames): + if i == frames - 1: + return 0 + + if i <= frames/2: + return easeInOutQuad(i, min, max, frames/2) + else: + return max - easeInOutQuad(i - frames/2, min, max, frames/2) + +def introFrames(parameters): + # 3 Sekunde Text Fadein + frames = 1*fps + for i in range(0, frames): + yield ( + ('textblock', 'style', 'opacity', "%.4f" % easeLinear(i, 0, 1, frames)), + ) + + # 4 Sekunden stehen lassen + frames = 4*fps + for i in range(0, frames): + yield () + + # 1 Sekunde Fade to black layer + frames = 1*fps + for i in range(0, frames): + yield ( + ('fadeout', 'style', 'opacity', "%.4f" % easeLinear(i, 0, 1, frames)), + ) + +def outroFrames(p): + # 5 Sekunden stehen bleiben + frames = 5*fps + for i in range(0, frames): + yield [] + +def debug(): + render( + 'intro.svg', + '../intro.ts', + introFrames, + { + '$ID': 4711, + '$TITLE': "Long Long Long title is LONG", + '$SUBTITLE': 'Long Long Long Long subtitle is LONGER', + '$SPEAKER': 'Long Name of Dr. Dr. Prof. Dr. Long Long' + } + ) + + render( + 'outro.svg', + '../outro.ts', + outroFrames + ) + +def tasks(queue, args, idlist, skiplist): + # iterate over all events extracted from the schedule xml-export + for event in events(scheduleUrl): + if not (idlist==[]): + if 000000 in idlist: + print("skipping id (%s [%s])" % (event['title'], event['id'])) + continue + if int(event['id']) not in idlist: + print("skipping id (%s [%s])" % (event['title'], event['id'])) + continue + + # generate a task description and put it into the queue + queue.put(Rendertask( + infile = 'intro.svg', + outfile = str(event['id'])+".ts", + sequence = introFrames, + parameters = { + '$ID': event['id'], + '$TITLE': event['title'], + '$SUBTITLE': event['subtitle'], + '$SPEAKER': event['personnames'] + } + )) + + # place a task for the outro into the queue + if not "out" in skiplist: + queue.put(Rendertask( + infile = 'outro.svg', + outfile = 'outro.ts', + sequence = outroFrames + )) diff --git a/pwb18/artwork/PWB18-Logo-green-web.png b/pwb18/artwork/PWB18-Logo-green-web.png new file mode 100644 index 0000000..25daccd Binary files /dev/null and b/pwb18/artwork/PWB18-Logo-green-web.png differ diff --git a/pwb18/artwork/cc-by-sa.svg b/pwb18/artwork/cc-by-sa.svg new file mode 100644 index 0000000..01629e8 --- /dev/null +++ b/pwb18/artwork/cc-by-sa.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/pwb18/artwork/graph-3.png b/pwb18/artwork/graph-3.png new file mode 100644 index 0000000..53bbabb Binary files /dev/null and b/pwb18/artwork/graph-3.png differ diff --git a/pwb18/artwork/intro.svg b/pwb18/artwork/intro.svg new file mode 100644 index 0000000..10bffce --- /dev/null +++ b/pwb18/artwork/intro.svg @@ -0,0 +1,283 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + $TITLE $SPEAKER + + + + + + diff --git a/pwb18/artwork/outro.svg b/pwb18/artwork/outro.svg new file mode 100644 index 0000000..2c8bc93 --- /dev/null +++ b/pwb18/artwork/outro.svg @@ -0,0 +1,290 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + Mehr Videos auf media.ccc.de + + + + + + + + + + + + + + + + + + +