From deaede48281786ed43fc3098f0cb47756d570515 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Tue, 21 Jun 2016 19:14:12 +0200 Subject: [PATCH] osc16 intros --- osc16/__init__.py | 113 +++++++++++ osc16/artwork/intro.svg | 177 +++++++++++++++++ osc16/artwork/outro.svg | 431 ++++++++++++++++++++++++++++++++++++++++ osc16/artwork/pause.svg | 146 ++++++++++++++ 4 files changed, 867 insertions(+) create mode 100644 osc16/__init__.py create mode 100644 osc16/artwork/intro.svg create mode 100644 osc16/artwork/outro.svg create mode 100644 osc16/artwork/pause.svg diff --git a/osc16/__init__.py b/osc16/__init__.py new file mode 100644 index 0000000..6afa7d0 --- /dev/null +++ b/osc16/__init__.py @@ -0,0 +1,113 @@ +#!/usr/bin/python + +import subprocess +import os.path +from renderlib import * +from easing import * + +# URL to Schedule-XML +scheduleUrl = 'https://events.opensuse.org/conference/oSC16/schedule.xml' + +# For (really) too long titles +titlemap = { + # +} + +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): + move=50 + + # 3 Sekunde Text Fadein + frames = 3*fps + for i in range(0, frames): + yield ( + ('textblock', 'style', 'opacity', "%.4f" % easeLinear(i, 0, 1, frames)), + ('textblock', 'attr', 'transform', 'translate(%.4f, 0)' % easeOutQuad(i, -move, move, frames)), + ) + + # 2 Sekunden stehen lassen + frames = 2*fps + for i in range(0, frames): + yield () + + # 3 Sekunde Text Fadeout + frames = 3*fps + for i in range(0, frames): + yield ( + ('textblock', 'style', 'opacity', "%.4f" % easeLinear(i, 1, -1, frames)), + ('textblock', 'attr', 'transform', 'translate(%.4f, 0)' % easeInQuad(i, 0, move, frames)), + ) + +def pauseFrames(parameters): + frames = 25*3 + for i in range(0, frames): + yield ( + ('glowFlood', 'attr', 'flood-opacity', '%.4f' % bounce(i, 0.0, 1.0, frames)), + ) + + frames = 25*1 + for i in range(0, frames): + yield ( + ('glowFlood', 'attr', 'flood-opacity', '%.4f' % 0), + ) + + +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': 20227, + '$TITLE': "Leben mit dem Saurier", + '$SUBTITLE': '', + '$SPEAKER': 'Sarah' + } + ) + + render( + 'pause.svg', + '../pause.ts', + pauseFrames + ) + + render( + 'outro.svg', + '../outro.ts', + outroFrames + ) + +def tasks(queue, args): + # iterate over all events extracted from the schedule xml-export + for event in events(scheduleUrl): + + if len(args) > 0: + if not str(event['id']) in args: + 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'] + } + )) diff --git a/osc16/artwork/intro.svg b/osc16/artwork/intro.svg new file mode 100644 index 0000000..e0e7b82 --- /dev/null +++ b/osc16/artwork/intro.svg @@ -0,0 +1,177 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + $SPEAKER$TITLE$SUBTITLE $ID + + diff --git a/osc16/artwork/outro.svg b/osc16/artwork/outro.svg new file mode 100644 index 0000000..77882b6 --- /dev/null +++ b/osc16/artwork/outro.svg @@ -0,0 +1,431 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + More Recordings available on media.ccc.de + + + + + + + + + www.ccc.de + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/osc16/artwork/pause.svg b/osc16/artwork/pause.svg new file mode 100644 index 0000000..5118ff6 --- /dev/null +++ b/osc16/artwork/pause.svg @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + +