diff --git a/pydata15/__init__.py b/pydata15/__init__.py new file mode 100644 index 0000000..06f9c9e --- /dev/null +++ b/pydata15/__init__.py @@ -0,0 +1,133 @@ +#!/usr/bin/python + +import subprocess +import os.path +from renderlib import * + +# URL to Schedule-XML +scheduleUrl = 'https://raw.githubusercontent.com/pydataberlin/pydataberlin.github.io/master/utils/pydata_berlin_voc.xml' + +# For (really) too long titles +titlemap = { + +} + +def introFrames(parameters): + frames = int(.5*fps) + for i in range(0, frames): + yield ( + ('name', 'style', 'fill-opacity', 0), + ('title', 'style', 'fill-opacity', 0), + ) + + frames = 1*fps + for i in range(0, frames): + yield ( + ('name', 'style', 'fill-opacity', '%.4f' % easeInCubic(i, 0, 1, 3*fps)), + ('title', 'style', 'fill-opacity', 0), + ) + + frames = 2*fps + for i in range(0, frames): + yield ( + ('name', 'style', 'fill-opacity', '%.4f' % easeInCubic(i+1*fps, 0, 1, 3*fps)), + ('title', 'style', 'fill-opacity', '%.4f' % easeInCubic(i, 0, 1, 3*fps)), + ) + + frames = 1*fps + for i in range(0, frames): + yield ( + ('name', 'style', 'fill-opacity', 1), + ('title', 'style', 'fill-opacity', '%.4f' % easeInCubic(i+2*fps, 0, 1, 3*fps)), + ) + + frames = 3*fps + for i in range(0, frames): + yield ( + ('name', 'style', 'fill-opacity', 1), + ('title', 'style', 'fill-opacity', 1), + ) + + frames = 2*fps + for i in range(0, frames): + yield ( + ('name', 'style', 'fill-opacity', easeLinear(i, 1, -1, frames)), + ('title', 'style', 'fill-opacity', easeLinear(i, 1, -1, frames)), + ) + +def outroFrames(parameters): + frames = 1*fps + for i in range(0, frames): + yield ( + ('plate', 'style', 'opacity', '%.4f' % easeInCubic(i, 0, 1, 3*fps)), + ('text', 'style', 'opacity', 0), + ) + + frames = 2*fps + for i in range(0, frames): + yield ( + ('plate', 'style', 'opacity', '%.4f' % easeInCubic(i+1*fps, 0, 1, 3*fps)), + ('text', 'style', 'opacity', '%.4f' % easeInCubic(i, 0, 1, 3*fps)), + ) + + frames = 1*fps + for i in range(0, frames): + yield ( + ('plate', 'style', 'opacity', 1), + ('text', 'style', 'opacity', '%.4f' % easeInCubic(i+2*fps, 0, 1, 3*fps)), + ) + + frames = 3*fps + for i in range(0, frames): + yield ( + ('plate', 'style', 'opacity', 1), + ('text', 'style', 'opacity', 1), + ) + + frames = 2*fps + for i in range(0, frames): + yield ( + ('plate', 'style', 'opacity', easeLinear(i, 1, -1, frames)), + ('text', 'style', 'opacity', easeLinear(i, 1, -1, frames)), + ) + +def debug(): + render( + 'outro.svg', + '../outro.dv', + outroFrames + ) + + render( + 'intro.svg', + '../intro.dv', + introFrames, + { + '$id': 20227, + '$title': "Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspective", + '$subtitle': '', + '$personnames': 'Felix Marczinowski, Philipp Mack, Sönke Niekamp' + } + ) + +def tasks(queue): + uid = [] + # iterate over all events extracted from the schedule xml-export + for event in events(scheduleUrl): + if event['id'] in uid: + continue + + uid.append(event['id']) + + # generate a task description and put them into the queue + queue.put(Rendertask( + infile = 'intro.svg', + outfile = str(event['id'])+".dv", + sequence = introFrames, + parameters = { + '$id': event['id'], + '$title': event['title'], + '$subtitle': event['subtitle'], + '$personnames': event['personnames'] + } + )) diff --git a/pydata15/artwork/by-sa.svg b/pydata15/artwork/by-sa.svg new file mode 100644 index 0000000..f850297 --- /dev/null +++ b/pydata15/artwork/by-sa.svg @@ -0,0 +1,199 @@ + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pydata15/artwork/intro.svg b/pydata15/artwork/intro.svg new file mode 100644 index 0000000..2bd8f4a --- /dev/null +++ b/pydata15/artwork/intro.svg @@ -0,0 +1,90 @@ + + + + + + + + + + + + + image/svg+xml + + + + + + + $personnames$title + + diff --git a/pydata15/artwork/logo.png b/pydata15/artwork/logo.png new file mode 100644 index 0000000..0c623a3 Binary files /dev/null and b/pydata15/artwork/logo.png differ diff --git a/pydata15/artwork/outro.svg b/pydata15/artwork/outro.svg new file mode 100644 index 0000000..a0dea05 --- /dev/null +++ b/pydata15/artwork/outro.svg @@ -0,0 +1,223 @@ + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) + + + diff --git a/pydata15/artwork/overlay-1024x576.png b/pydata15/artwork/overlay-1024x576.png new file mode 100644 index 0000000..15e281c Binary files /dev/null and b/pydata15/artwork/overlay-1024x576.png differ diff --git a/pydata15/artwork/overlay-720x576.png b/pydata15/artwork/overlay-720x576.png new file mode 100644 index 0000000..0bd6cd9 Binary files /dev/null and b/pydata15/artwork/overlay-720x576.png differ