From ab0ca08ec69f5341660ff028dd29d392375eb2fa Mon Sep 17 00:00:00 2001 From: Florian Zeitz Date: Thu, 7 Nov 2019 17:53:11 +0100 Subject: [PATCH] Add sonoj2019 --- sonoj19/__init__.py | 149 ++++++++++++++ sonoj19/artwork/intro.svg | 282 +++++++++++++++++++++++++++ sonoj19/artwork/outro.svg | 399 ++++++++++++++++++++++++++++++++++++++ sonoj19/artwork/pause.svg | 289 +++++++++++++++++++++++++++ 4 files changed, 1119 insertions(+) create mode 100644 sonoj19/__init__.py create mode 100644 sonoj19/artwork/intro.svg create mode 100644 sonoj19/artwork/outro.svg create mode 100644 sonoj19/artwork/pause.svg diff --git a/sonoj19/__init__.py b/sonoj19/__init__.py new file mode 100644 index 0000000..1d1d3bc --- /dev/null +++ b/sonoj19/__init__.py @@ -0,0 +1,149 @@ +#!/usr/bin/python3 + +from renderlib import * +from easing import * +from math import sin, pi + +scheduleUrl = 'https://babelmonkeys.de/~florob/sj19-schedule.xml' + +def introFrames(p): + + handle1_off = 120 + handle2_off = 247 + handle3_off = 80 + + # kurz stehen bleiben + frames = int(0.5 * fps) + for i in range(0, frames): + yield ( + ('handle1', 'attr', 'transform', "translate(0, {})".format(handle1_off)), + ('handle2', 'attr', 'transform', "translate(0, {})".format(handle2_off)), + ('handle3', 'attr', 'transform', "translate(0, {})".format(handle3_off)), + ) + + # handle 1 anheben + frames = 3 * fps + for i in range(0, frames): + y = (1.0 - i / frames) * handle1_off + yield ( + ('handle1', 'attr', 'transform', "translate(0, {})".format(y)), + ('handle2', 'attr', 'transform', "translate(0, {})".format(handle2_off)), + ('handle3', 'attr', 'transform', "translate(0, {})".format(handle3_off)), + ) + + # kurz stehen bleiben + frames = int(0.2 * fps) + for i in range(0, frames): + yield ( + ('handle2', 'attr', 'transform', "translate(0, {})".format(handle2_off)), + ('handle3', 'attr', 'transform', "translate(0, {})".format(handle3_off)), + ) + + # handle 2 anheben + frames = 3 * fps + for i in range(0, frames): + y = (1.0 - i / frames) * handle2_off + yield ( + ('handle2', 'attr', 'transform', "translate(0, {})".format(y)), + ('handle3', 'attr', 'transform', "translate(0, {})".format(handle3_off)), + ) + + # kurz stehen bleiben + frames = int(0.2 * fps) + for i in range(0, frames): + yield ( + ('handle3', 'attr', 'transform', "translate(0, {})".format(handle3_off)), + ) + + # handle 3 anheben + frames = 3 * fps + for i in range(0, frames): + y = (1.0 - i / frames) * handle3_off + yield ( + ('handle3', 'attr', 'transform', "translate(0, {})".format(y)), + ) + + # kurz stehen bleiben + frames = int(0.5 * fps) + for i in range(0, frames): + yield () + +def pauseFrames(p): + handle1_off = 110 + handle2_off = 150 + handle3_off = 110 + + frames = 10 * fps + for i in range(0, frames): + yield ( + ('handle1', 'attr', 'transform', "translate(0, {})".format(sin(2 * pi * i / frames) * handle1_off)), + ('handle2', 'attr', 'transform', "translate(0, {})".format(sin(2 * pi * i / frames + 0.5 * pi) * handle2_off)), + ('handle3', 'attr', 'transform', "translate(0, {})".format(sin(2 * pi * i / frames + 1.0 * pi) * handle3_off)), + ) + +def outroFrames(p): + # 5 Sekunde stehen lassen + frames = 5 * fps + for i in range(0, frames): + yield () + + +def debug(): + render( + 'intro.svg', + '../18271.ts', + introFrames, + { + '$date': "October 27th, 2018", + '$title': "Welcome", + '$subtitle': 'What is Open Source?', + '$personnames': 'Nils Hilbricht' + } + ) + + 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 them into the queue + queue.put(Rendertask( + infile='intro.svg', + outfile=str(event['id']) + ".ts", + sequence=introFrames, + parameters={ + '$date': "October 4th, 2017", + '$id': event['id'], + '$title': event['title'], + '$subtitle': event['subtitle'] or '', + '$personnames': event['personnames'] + } + )) + + if not "pause" in skiplist: + queue.put(Rendertask( + infile='pause.svg', + outfile='pause.ts', + sequence=pauseFrames + )) + + # 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/sonoj19/artwork/intro.svg b/sonoj19/artwork/intro.svg new file mode 100644 index 0000000..06523db --- /dev/null +++ b/sonoj19/artwork/intro.svg @@ -0,0 +1,282 @@ + + + + + Sonoj Convention Logo + + + + + + + + + + image/svg+xml + + Sonoj Convention Logo + 2018-05-07 + + + Nils Hilbricht + + + + + All Rights Reserved + + + http://www.sonoj.org + The logo of the Sonoj Convention. The font is a based on Sturkopf Grotesk by Uwe Borchert (SIL Open Font License) +The white space left and right is two times the width of the small "o" from "convention" each. And top/bottom is the height of the same "o" each. + + + + + + + $personnames$title$subtitle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sonoj19/artwork/outro.svg b/sonoj19/artwork/outro.svg new file mode 100644 index 0000000..56a5926 --- /dev/null +++ b/sonoj19/artwork/outro.svg @@ -0,0 +1,399 @@ + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + https://creativecommons.org/licenses/by/4.0/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sonoj19/artwork/pause.svg b/sonoj19/artwork/pause.svg new file mode 100644 index 0000000..80246b5 --- /dev/null +++ b/sonoj19/artwork/pause.svg @@ -0,0 +1,289 @@ + + + + + Sonoj Convention Logo + + + + + + + + image/svg+xml + + Sonoj Convention Logo + 2018-05-07 + + + Nils Hilbricht + + + + + All Rights Reserved + + + http://www.sonoj.org + The logo of the Sonoj Convention. The font is a based on Sturkopf Grotesk by Uwe Borchert (SIL Open Font License) +The white space left and right is two times the width of the small "o" from "convention" each. And top/bottom is the height of the same "o" each. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 𝄽 + 𝄽 + Break + Break + +