diff --git a/guadec16/__init__.py b/guadec16/__init__.py new file mode 100644 index 0000000..805e094 --- /dev/null +++ b/guadec16/__init__.py @@ -0,0 +1,174 @@ +#!/usr/bin/python + +import subprocess +import os.path +from renderlib import * +from easing import * + +# URL to Schedule-XML +scheduleUrl = 'https://static.gnome.org/guadec-2016/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): + firstmove=2100 + move=100 + + + # 0.5 seconds blue + frames = int(fps/2) + for i in range(0, frames): + yield ( + ('fadetoblack', 'style', 'opacity', "%.4f" % easeLinear(i, 1, -1, frames-1)), + ('title', 'style', 'opacity', "0"), + ('longtitle', 'style', 'opacity', "0"), + ('presentedby', 'style', 'opacity', "0"), + ('speaker', 'style', 'opacity', "0"), + ('longspeaker', 'style', 'opacity', "0"), + ('overlay', 'style', 'opacity', "0"), + ('guadeclogo', 'style', 'opacity', "0"), + ('onhold', 'style', 'opacity', "0"), + ('onlinediscussion', 'style', 'opacity', "0"), + ) + + # 0.5 seconds background fade in + frames = int(fps/2) + for i in range(0, frames): + yield ( + ('guadeclogo', 'style', 'opacity', "%.4f" % easeLinear(i, 0, 1, frames-1)), + ('overlay', 'style', 'opacity', "%.4f" % easeLinear(i, 0, 1, frames-1)), + ('overlay', 'attr', 'transform', 'translate(0, %.4f)' % easeOutQuad(i, firstmove, -firstmove, frames-1)), + ) + + # 0.6 seconds still + frames = int(fps/1.75) + for i in range(0, frames): + yield () + + # 0.2 seconds title text fade in + frames = int(fps/5) + for i in range(0, frames): + yield ( + ('title', 'style', 'opacity', "%.4f" % easeLinear(i, 0, 1, frames-1)), + ('longtitle', 'style', 'opacity', "%.4f" % easeLinear(i, 0, 1, frames-1)), + ('titletranslator', 'attr', 'transform', 'translate(0, %.4f)' % easeOutQuad(i, -move, move, frames-1)), + ) + + # 0.2 seconds presented by text fade in + frames = int(fps/5) + for i in range(0, frames): + yield ( + ('presentedby', 'style', 'opacity', "%.4f" % easeLinear(i, 0, 1, frames-1)), + ('presentedby', 'attr', 'transform', 'translate(0, %.4f)' % easeOutQuad(i, -move, move, frames-1)), + ) + # 0.2 seconds speaker/onhold text fade in + frames = int(fps/5) + for i in range(0, frames): + yield ( + ('speaker', 'style', 'opacity', "%.4f" % easeLinear(i, 0, 1, frames-1)), + ('longspeaker', 'style', 'opacity', "%.4f" % easeLinear(i, 0, 1, frames-1)), + ('speakertranslator', 'attr', 'transform', 'translate(0, %.4f)' % easeOutQuad(i, -move, move, frames-1)), + ('onhold', 'style', 'opacity', "%.4f" % easeLinear(i, 0, 1, frames-1)), + ('onhold', 'attr', 'transform', 'translate(0, %.4f)' % easeOutQuad(i, -move, move, frames-1)), + ('onlinediscussion', 'style', 'opacity', "%.4f" % easeLinear(i, 0, 1, frames-1)), + ) + + # 4 seconds still + frames = 4*fps + for i in range(0, frames): + yield ( + ('title', 'style', 'opacity', "1"), + ('longtitle', 'style', 'opacity', "1"), + ('presentedby', 'style', 'opacity', "1"), + ('onhold', 'style', 'opacity', "1"), + ('speaker', 'style', 'opacity', "1"), + ('longspeaker', 'style', 'opacity', "1"), + ) + +def outroFrames(p): + # 7 seconds of slow scaling, fade to black at the end + frames = 7*fps + for i in range(0, frames): + scale = easeLinear(i, 1.3, 0.3 , frames-1) + opacity = 0 + if i > int(frames*0.7): + opacity = easeLinear(int(i-frames*0.7), 0, 1, int(frames-frames*0.7)-1) + yield ( + ('guadeclogoscale', 'attr', 'transform', 'scale({scale},{scale})'.format(scale=scale),), + ('fadetoblack', 'style', 'opacity', '{opac}'.format(opac=opacity),), + ) + + # 2 seconds of black + frames = 2*fps + for i in range(0, frames): + yield ( + ('fadetoblack', 'style', 'opacity', "1"), + ) + + +def debug(): + render( + 'intro.svg', + '../intro.ts', + introFrames, + { + '$title': "Long Long Long title is LONG", + '$sub': 'Long Long Long Long subtitle is LONGER', + '$speaker': 'Long Name of Dr. Dr. Prof. Dr. Long Long' + } + ) + + render( + 'pause.svg', + '../pause.ts', + introFrames, + ) + + 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 + + if len(event['title']) < 71: + params = { + '$title': event['title'], + '$longtitle': '', + '$speaker': '', + '$longspeaker': event['personnames'] + } + else: + params = { + '$title': '', + '$longtitle': event['title'], + '$speaker': '', + '$longspeaker': event['personnames'] + } + + # generate a task description and put it into the queue + queue.put(Rendertask( + infile = 'intro.svg', + outfile = str(event['id'])+".ts", + sequence = introFrames, + parameters = params + )) diff --git a/guadec16/artwork/intro.svg b/guadec16/artwork/intro.svg new file mode 100644 index 0000000..2442d57 --- /dev/null +++ b/guadec16/artwork/intro.svg @@ -0,0 +1,515 @@ + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + $speaker $longspeaker + + PRESENTED BY + + + $title $longtitle + + + diff --git a/guadec16/artwork/outro.svg b/guadec16/artwork/outro.svg new file mode 100644 index 0000000..7a6ecb7 --- /dev/null +++ b/guadec16/artwork/outro.svg @@ -0,0 +1,887 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + The + Conference + + + + + + + + + + + + + + + + + + + TM + + + + + + + + Karlsruhe August 15th - 17th, 2016 + + + + + + + + + + + + + + + + + + + + + + + + + + + + VERSION 4.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The + Conference + + + + + + + + + + + + + + + + + + + TM + + + + + + + + Karlsruhe August 15th - 17th, 2016 + + + diff --git a/guadec16/artwork/overlays/s1_hd.png b/guadec16/artwork/overlays/s1_hd.png new file mode 100644 index 0000000..58fd8b9 Binary files /dev/null and b/guadec16/artwork/overlays/s1_hd.png differ diff --git a/guadec16/artwork/pause.svg b/guadec16/artwork/pause.svg new file mode 100644 index 0000000..ffc8d60 --- /dev/null +++ b/guadec16/artwork/pause.svg @@ -0,0 +1,441 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + Join the online discussion on social media with #GUADEC2016. + + + On Hold. + + +