Merge branch 'master' of git.c3voc.de:intro-outro-generator
154
forumoe19/__init__.py
Normal file
|
@ -0,0 +1,154 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
from renderlib import *
|
||||
from easing import *
|
||||
|
||||
# URL to Schedule-XML
|
||||
scheduleUrl = 'https://gist.githubusercontent.com/danimo/3cf27a2198da2fbc7c1fb138c13506ce/raw/forumoe19-schedule.xml'
|
||||
|
||||
personmap = {
|
||||
1: 'Margit Stumpp (Fraktion B. 90/Die Grünen)',
|
||||
2: 'Marja-Liisa Völlers (SPD-Fraktion)',
|
||||
3: 'Dr. Jens Brandenburg (FDP-Fraktion)',
|
||||
}
|
||||
|
||||
taglinemap = {
|
||||
1: "Bildungspolitische Sprecherin",
|
||||
2: "Expertin für frühk., schul. und berufl. Bildung",
|
||||
3: "Sprecher für Studium und Bildung",
|
||||
4: "mediale.pfade",
|
||||
}
|
||||
|
||||
|
||||
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):
|
||||
# 1 Sekunde Text Fadein
|
||||
frames = 1*fps
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('text', 'style', 'opacity', "%.4f" % easeLinear(i, 0, 1, frames)),
|
||||
)
|
||||
|
||||
# 4 Sekunden stehen lassen
|
||||
frames = 4*fps
|
||||
for i in range(0, frames):
|
||||
yield ()
|
||||
|
||||
def outroFrames(p):
|
||||
# 5 Sekunden stehen bleiben
|
||||
frames = 5*fps
|
||||
for i in range(0, frames):
|
||||
yield []
|
||||
|
||||
def bbFrames(parameters):
|
||||
# 1 Sekunde Text Fadein
|
||||
frames = 1*fps
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('bg', 'style', 'opacity', "%.4f" % easeLinear(i, 0, 1, frames)),
|
||||
('text', 'style', 'opacity', "%.4f" % easeLinear(i, 0, 1, frames)),
|
||||
)
|
||||
|
||||
# 3 Sekunden stehen lassen
|
||||
frames = 3*fps
|
||||
for i in range(0, frames):
|
||||
yield ()
|
||||
|
||||
frames = 1*fps
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('bg', 'style', 'opacity', "%.4f" % easeLinear(i, 1, -1, frames)),
|
||||
('text', 'style', 'opacity', "%.4f" % easeLinear(i, 1, -1, frames)),
|
||||
)
|
||||
|
||||
|
||||
|
||||
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(
|
||||
'insert.svg',
|
||||
'../insert.mkv',
|
||||
bbFrames,
|
||||
{
|
||||
'$PERSON': "Prof. Bernhard Birnbaum",
|
||||
'$TAGLINE': "Leiter des rennomierten Birnbaum-Instituts",
|
||||
}
|
||||
)
|
||||
|
||||
# render(
|
||||
# 'pause.svg',
|
||||
# '../pause.ts',
|
||||
# pauseFrames
|
||||
# )
|
||||
#
|
||||
# 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 event['room'] not in ('ecdf'):
|
||||
print("skipping room %s (%s [%s])" % (event['room'], event['title'], event['id']))
|
||||
continue
|
||||
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
|
||||
))
|
||||
|
||||
for person in persons(scheduleUrl, personmap, taglinemap):
|
||||
queue.put(Rendertask(
|
||||
infile = 'insert.svg',
|
||||
outfile = "insert_{}.mkv".format(person['person'].replace("/", "_")),
|
||||
sequence = bbFrames,
|
||||
parameters = {
|
||||
'$PERSON': person['person'],
|
||||
'$TAGLINE': person['tagline'],
|
||||
}
|
||||
))
|
||||
|
BIN
forumoe19/artwork/5_Intro-Video.png
Normal file
After Width: | Height: | Size: 100 KiB |
12
forumoe19/artwork/CC-Zero-badge.svg
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="88" height="31" viewBox="0 0 88 31" baseProfile="basic" version="1.1">
|
||||
<g id="surface1">
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(66.666667%,69.803922%,67.058824%);fill-opacity:1;" d="M 2.300781 0.570313 L 85.429688 0.71875 C 86.589844 0.71875 87.628906 0.546875 87.628906 3.039063 L 87.527344 30.414063 L 0.203125 30.414063 L 0.203125 2.9375 C 0.203125 1.707031 0.324219 0.570313 2.300781 0.570313 Z "/>
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 86.351563 0.199219 L 1.648438 0.199219 C 0.738281 0.199219 0 0.9375 0 1.847656 L 0 30.628906 C 0 30.832031 0.167969 31 0.371094 31 L 87.628906 31 C 87.832031 31 88 30.832031 88 30.628906 L 88 1.847656 C 88 0.9375 87.261719 0.199219 86.351563 0.199219 Z M 1.648438 0.945313 L 86.351563 0.945313 C 86.851563 0.945313 87.253906 1.347656 87.253906 1.847656 C 87.253906 1.847656 87.253906 13.46875 87.253906 21.851563 L 26.515625 21.851563 C 24.296875 25.863281 20.023438 28.585938 15.117188 28.585938 C 10.207031 28.585938 5.933594 25.863281 3.714844 21.851563 L 0.746094 21.851563 C 0.746094 13.46875 0.746094 1.847656 0.746094 1.847656 C 0.746094 1.347656 1.148438 0.945313 1.648438 0.945313 Z "/>
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 46.753906 23.984375 L 50.832031 23.984375 L 50.832031 24.738281 L 48.230469 27.886719 L 50.90625 27.886719 L 50.90625 28.832031 L 46.679688 28.832031 L 46.679688 28.074219 L 49.28125 24.925781 L 46.753906 24.925781 L 46.753906 23.984375 M 51.8125 23.984375 L 55.183594 23.984375 L 55.183594 24.925781 L 53.0625 24.925781 L 53.0625 25.832031 L 55.058594 25.832031 L 55.058594 26.773438 L 53.0625 26.773438 L 53.0625 27.886719 L 55.253906 27.886719 L 55.253906 28.832031 L 51.8125 28.832031 L 51.8125 23.984375 M 58.132813 26.132813 C 58.394531 26.132813 58.582031 26.082031 58.695313 25.984375 C 58.808594 25.890625 58.867188 25.730469 58.867188 25.503906 C 58.867188 25.285156 58.808594 25.125 58.695313 25.03125 C 58.582031 24.9375 58.394531 24.890625 58.132813 24.890625 L 57.605469 24.890625 L 57.605469 26.132813 L 58.132813 26.132813 M 57.605469 26.996094 L 57.605469 28.832031 L 56.355469 28.832031 L 56.355469 23.984375 L 58.265625 23.984375 C 58.902344 23.984375 59.371094 24.089844 59.667969 24.304688 C 59.964844 24.519531 60.117188 24.855469 60.117188 25.320313 C 60.117188 25.640625 60.039063 25.902344 59.882813 26.109375 C 59.730469 26.316406 59.496094 26.464844 59.183594 26.5625 C 59.355469 26.601563 59.507813 26.691406 59.640625 26.832031 C 59.777344 26.964844 59.914063 27.175781 60.054688 27.453125 L 60.734375 28.832031 L 59.402344 28.832031 L 58.8125 27.625 C 58.691406 27.382813 58.570313 27.21875 58.445313 27.128906 C 58.324219 27.039063 58.164063 26.996094 57.960938 26.996094 L 57.605469 26.996094 M 63.6875 24.800781 C 63.304688 24.800781 63.011719 24.941406 62.800781 25.222656 C 62.589844 25.503906 62.484375 25.902344 62.484375 26.410156 C 62.484375 26.921875 62.589844 27.316406 62.800781 27.597656 C 63.011719 27.878906 63.304688 28.019531 63.6875 28.019531 C 64.070313 28.019531 64.367188 27.878906 64.578125 27.597656 C 64.785156 27.316406 64.890625 26.921875 64.890625 26.410156 C 64.890625 25.902344 64.785156 25.503906 64.578125 25.222656 C 64.367188 24.941406 64.070313 24.800781 63.6875 24.800781 M 63.6875 23.894531 C 64.464844 23.894531 65.078125 24.117188 65.519531 24.5625 C 65.960938 25.011719 66.179688 25.625 66.179688 26.410156 C 66.179688 27.195313 65.960938 27.808594 65.519531 28.253906 C 65.078125 28.703125 64.464844 28.925781 63.6875 28.925781 C 62.910156 28.925781 62.300781 28.703125 61.855469 28.253906 C 61.414063 27.808594 61.195313 27.195313 61.195313 26.410156 C 61.195313 25.625 61.414063 25.011719 61.855469 24.5625 C 62.300781 24.117188 62.910156 23.894531 63.6875 23.894531 "/>
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 25.121094 14.578125 C 25.125 20.097656 20.648438 24.578125 15.125 24.582031 C 9.605469 24.585938 5.125 20.113281 5.121094 14.589844 C 5.121094 14.585938 5.121094 14.582031 5.121094 14.578125 C 5.117188 9.054688 9.59375 4.578125 15.113281 4.574219 C 20.636719 4.570313 25.117188 9.042969 25.121094 14.566406 C 25.121094 14.570313 25.121094 14.574219 25.121094 14.578125 Z "/>
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 23.25 6.433594 C 25.464844 8.652344 26.574219 11.367188 26.574219 14.578125 C 26.574219 17.789063 25.484375 20.476563 23.304688 22.636719 C 20.992188 24.910156 18.261719 26.046875 15.105469 26.046875 C 11.992188 26.046875 9.304688 24.921875 7.050781 22.664063 C 4.792969 20.410156 3.667969 17.714844 3.667969 14.578125 C 3.667969 11.441406 4.792969 8.726563 7.050781 6.433594 C 9.246094 4.214844 11.933594 3.109375 15.105469 3.109375 C 18.316406 3.109375 21.03125 4.214844 23.25 6.433594 Z M 8.542969 7.925781 C 6.667969 9.820313 5.730469 12.035156 5.730469 14.582031 C 5.730469 17.125 6.660156 19.324219 8.511719 21.175781 C 10.367188 23.03125 12.578125 23.960938 15.140625 23.960938 C 17.703125 23.960938 19.929688 23.023438 21.824219 21.148438 C 23.621094 19.410156 24.519531 17.21875 24.519531 14.582031 C 24.519531 11.960938 23.605469 9.738281 21.78125 7.910156 C 19.953125 6.085938 17.742188 5.171875 15.140625 5.171875 C 12.539063 5.171875 10.339844 6.089844 8.542969 7.925781 Z M 13.476563 13.460938 C 13.1875 12.835938 12.761719 12.523438 12.1875 12.523438 C 11.175781 12.523438 10.671875 13.207031 10.671875 14.566406 C 10.671875 15.925781 11.175781 16.605469 12.1875 16.605469 C 12.855469 16.605469 13.332031 16.277344 13.617188 15.613281 L 15.019531 16.359375 C 14.351563 17.542969 13.351563 18.136719 12.015625 18.136719 C 10.984375 18.136719 10.15625 17.824219 9.539063 17.191406 C 8.917969 16.558594 8.609375 15.6875 8.609375 14.578125 C 8.609375 13.488281 8.925781 12.621094 9.566406 11.980469 C 10.207031 11.335938 11.003906 11.015625 11.957031 11.015625 C 13.371094 11.015625 14.378906 11.574219 14.992188 12.6875 Z M 20.066406 13.460938 C 19.78125 12.835938 19.359375 12.523438 18.808594 12.523438 C 17.777344 12.523438 17.261719 13.207031 17.261719 14.566406 C 17.261719 15.925781 17.777344 16.605469 18.808594 16.605469 C 19.476563 16.605469 19.945313 16.277344 20.210938 15.613281 L 21.644531 16.359375 C 20.976563 17.542969 19.976563 18.136719 18.644531 18.136719 C 17.613281 18.136719 16.789063 17.824219 16.171875 17.191406 C 15.550781 16.558594 15.242188 15.6875 15.242188 14.578125 C 15.242188 13.488281 15.554688 12.621094 16.183594 11.980469 C 16.8125 11.335938 17.613281 11.015625 18.585938 11.015625 C 19.996094 11.015625 21.003906 11.574219 21.613281 12.6875 Z "/>
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 60.03125 10.878906 C 60.03125 15.128906 58.308594 18.578125 56.183594 18.578125 C 54.054688 18.578125 52.332031 15.128906 52.332031 10.878906 C 52.332031 6.625 54.054688 3.179688 56.183594 3.179688 C 58.308594 3.179688 60.03125 6.625 60.03125 10.878906 Z "/>
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 56.429688 2.417969 C 51.582031 2.417969 50.359375 6.996094 50.359375 10.875 C 50.359375 14.757813 51.582031 19.332031 56.429688 19.332031 C 61.28125 19.332031 62.5 14.757813 62.5 10.875 C 62.5 6.996094 61.28125 2.417969 56.429688 2.417969 Z M 56.429688 5.609375 C 56.628906 5.609375 56.808594 5.636719 56.976563 5.679688 C 57.324219 5.980469 57.496094 6.394531 57.160156 6.976563 L 53.929688 12.914063 C 53.832031 12.160156 53.816406 11.425781 53.816406 10.875 C 53.816406 9.167969 53.9375 5.609375 56.429688 5.609375 Z M 58.847656 8.34375 C 59.019531 9.257813 59.042969 10.207031 59.042969 10.875 C 59.042969 12.585938 58.925781 16.144531 56.429688 16.144531 C 56.234375 16.144531 56.054688 16.125 55.886719 16.082031 C 55.851563 16.074219 55.824219 16.0625 55.792969 16.050781 C 55.742188 16.035156 55.6875 16.019531 55.640625 16 C 55.082031 15.765625 54.734375 15.335938 55.238281 14.582031 Z "/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 8.1 KiB |
BIN
forumoe19/artwork/Logo_Bündnis_Freie_Bildung_hochkant.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
forumoe19/artwork/insert.png
Normal file
After Width: | Height: | Size: 19 KiB |
97
forumoe19/artwork/insert.svg
Normal file
After Width: | Height: | Size: 30 KiB |
588
forumoe19/artwork/intro.svg
Normal file
After Width: | Height: | Size: 131 KiB |
BIN
forumoe19/artwork/logo-okfn.png
Normal file
After Width: | Height: | Size: 11 KiB |
583
forumoe19/artwork/outro.svg
Normal file
After Width: | Height: | Size: 135 KiB |
0
forumoe19/artwork/pause.svg
Normal file
BIN
forumoe19/artwork/wmde.png
Normal file
After Width: | Height: | Size: 28 KiB |
141
fusion19/__init__.py
Normal file
|
@ -0,0 +1,141 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
from renderlib import *
|
||||
from easing import *
|
||||
|
||||
# URL to Schedule-XML
|
||||
scheduleUrl = 'http://157.230.111.117/fusion19.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):
|
||||
# 1 Sekunde Text Fadein
|
||||
frames = 1 * fps
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('text', 'style', 'opacity', "%.4f" % easeLinear(i, 0, 1, frames)),
|
||||
)
|
||||
|
||||
# 4 Sekunden stehen lassen
|
||||
frames = 4 * fps
|
||||
for i in range(0, frames):
|
||||
yield ()
|
||||
|
||||
# 3 Sekunde Text Fadeout
|
||||
frames = 1 * fps
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('text', 'style', 'opacity', "%.4f" % easeLinear(i, 1, -1, frames)),
|
||||
)
|
||||
|
||||
# two final frames
|
||||
for i in range(0, 2):
|
||||
yield (
|
||||
('text', 'style', 'opacity', "%.4f" % 0),
|
||||
# ('text', 'attr', 'transform', 'translate(%.4f, 0)' % move),
|
||||
)
|
||||
|
||||
|
||||
def outroFrames(p):
|
||||
# 5 Sekunden stehen bleiben
|
||||
frames = 5 * fps
|
||||
for i in range(0, frames):
|
||||
yield []
|
||||
|
||||
def pauseFrames(args):
|
||||
pass
|
||||
|
||||
def pauseFrames_disable(args):
|
||||
#fade in pause
|
||||
frames = 4*fps
|
||||
for i in range(0, frames):
|
||||
yield(
|
||||
('pause', 'style', 'opacity', "%.4f" % easeInCubic(i, 0.2, 1, frames)),
|
||||
)
|
||||
|
||||
# fade out
|
||||
frames = 4*fps
|
||||
for i in range(0, frames):
|
||||
yield(
|
||||
('pause', 'style', 'opacity', "%.4f" % easeInCubic(i, 1, -0.8, frames)),
|
||||
)
|
||||
|
||||
|
||||
|
||||
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(
|
||||
# 'pause.svg',
|
||||
# '../pause.ts',
|
||||
# pauseFrames
|
||||
# )
|
||||
#
|
||||
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 event['room'] not in ('Content'):
|
||||
print("skipping room %s (%s [%s])" % (event['room'], event['title'], event['id']))
|
||||
continue
|
||||
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
|
||||
))
|
||||
|
||||
# place the pause-sequence into the queue
|
||||
if not "pause" in skiplist:
|
||||
queue.put(Rendertask(
|
||||
infile='pause.svg',
|
||||
outfile='pause.ts',
|
||||
sequence=pauseFrames
|
||||
))
|
BIN
fusion19/artwork/Zetafonts - Codec Cold Bold.ttf
Normal file
BIN
fusion19/artwork/Zetafonts - Codec Cold Regular.ttf
Normal file
BIN
fusion19/artwork/Zetafonts - CodecCold-Bold.otf
Normal file
BIN
fusion19/artwork/Zetafonts - CodecCold-Regular.otf
Normal file
145
fusion19/artwork/by.svg
Normal file
|
@ -0,0 +1,145 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="120"
|
||||
height="42"
|
||||
id="svg2759"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
version="1.0"
|
||||
sodipodi:docname="by.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape">
|
||||
<defs
|
||||
id="defs2761" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#8b8b8b"
|
||||
borderopacity="1"
|
||||
gridtolerance="10000"
|
||||
guidetolerance="10"
|
||||
objecttolerance="10"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="8.7327791"
|
||||
inkscape:cx="44.732823"
|
||||
inkscape:cy="22.995324"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="g260"
|
||||
width="120px"
|
||||
height="42px"
|
||||
inkscape:showpageshadow="false"
|
||||
inkscape:window-width="1918"
|
||||
inkscape:window-height="1024"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="36"
|
||||
showgrid="false"
|
||||
inkscape:window-maximized="0" />
|
||||
<metadata
|
||||
id="metadata2764">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<g
|
||||
transform="matrix(0.9937728,0,0,0.9936696,-177.69267,6.25128e-7)"
|
||||
id="g260"
|
||||
inkscape:export-filename="/mnt/hgfs/Bov/Documents/Work/2007/cc/identity/srr buttons/big/by.png"
|
||||
inkscape:export-xdpi="300.23013"
|
||||
inkscape:export-ydpi="300.23013">
|
||||
<g
|
||||
id="g131916">
|
||||
<path
|
||||
style="fill:#ff48b0;fill-opacity:1"
|
||||
d="M 181.96579,0.51074 L 296.02975,0.71338 C 297.6235,0.71338 299.04733,0.47705 299.04733,3.89404 L 298.90768,41.46093 L 179.08737,41.46093 L 179.08737,3.75439 C 179.08737,2.06934 179.25046,0.51074 181.96579,0.51074 z"
|
||||
nodetypes="ccccccc"
|
||||
id="path3817_1_" />
|
||||
<path
|
||||
id="path263"
|
||||
d="M 297.29636,0 L 181.06736,0 C 179.82078,0 178.80613,1.01416 178.80613,2.26074 L 178.80613,41.75732 C 178.80613,42.03906 179.03513,42.26757 179.31687,42.26757 L 299.04734,42.26757 C 299.32908,42.26757 299.55808,42.03905 299.55808,41.75732 L 299.55808,2.26074 C 299.55807,1.01416 298.54343,0 297.29636,0 z M 181.06735,1.02148 L 297.29635,1.02148 C 297.98043,1.02148 298.53658,1.57714 298.53658,2.26074 C 298.53658,2.26074 298.53658,18.20898 298.53658,29.71045 L 215.19234,29.71045 C 212.14742,35.21631 206.28121,38.95459 199.54879,38.95459 C 192.81344,38.95459 186.94869,35.21973 183.90524,29.71045 L 179.8276,29.71045 C 179.8276,18.20899 179.8276,2.26074 179.8276,2.26074 C 179.82761,1.57715 180.38376,1.02148 181.06735,1.02148 z" />
|
||||
<g
|
||||
id="g265"
|
||||
enable-background="new ">
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
id="path267"
|
||||
d="M 253.07761,32.95605 C 253.39499,32.95605 253.68503,32.98437 253.94773,33.04003 C 254.20945,33.09569 254.43308,33.18749 254.62058,33.31542 C 254.8071,33.44237 254.95261,33.6123 255.05515,33.82323 C 255.15769,34.03514 255.20945,34.29589 255.20945,34.60741 C 255.20945,34.94335 255.13328,35.22264 254.97996,35.44628 C 254.82762,35.67089 254.60105,35.85351 254.30223,35.99706 C 254.71434,36.11522 255.02196,36.32226 255.22508,36.61815 C 255.4282,36.91404 255.52977,37.27049 255.52977,37.68749 C 255.52977,38.02343 255.46434,38.31444 255.33348,38.56054 C 255.20262,38.80566 255.02586,39.00683 254.80516,39.1621 C 254.58348,39.31835 254.33055,39.43358 254.04735,39.5078 C 253.76317,39.583 253.47215,39.6201 253.17235,39.6201 L 249.936,39.6201 L 249.936,32.95604 L 253.07761,32.95604 L 253.07761,32.95605 z M 252.89011,35.65137 C 253.15183,35.65137 253.36667,35.58887 253.53562,35.46485 C 253.70359,35.34083 253.78757,35.13965 253.78757,34.86036 C 253.78757,34.70509 253.75925,34.57716 253.70359,34.47852 C 253.64695,34.37891 253.57273,34.30176 253.47898,34.24512 C 253.38523,34.18946 253.27781,34.15039 253.15671,34.12891 C 253.03561,34.10743 252.90866,34.09668 252.77878,34.09668 L 251.40476,34.09668 L 251.40476,35.65137 L 252.89011,35.65137 z M 252.97604,38.47949 C 253.11959,38.47949 253.25631,38.46582 253.38717,38.4375 C 253.51803,38.40918 253.63326,38.3623 253.73385,38.29785 C 253.83346,38.23242 253.91256,38.14355 253.97213,38.03125 C 254.0317,37.91992 254.061,37.77637 254.061,37.60254 C 254.061,37.26074 253.96432,37.0166 253.77096,36.87012 C 253.5776,36.72461 253.32174,36.65137 253.00436,36.65137 L 251.40475,36.65137 L 251.40475,38.47949 L 252.97604,38.47949 z" />
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
id="path269"
|
||||
d="M 255.78854,32.95605 L 257.43209,32.95605 L 258.99264,35.58789 L 260.54342,32.95605 L 262.17721,32.95605 L 259.70358,37.0625 L 259.70358,39.62012 L 258.23483,39.62012 L 258.23483,37.02539 L 255.78854,32.95605 z" />
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(0.872921,0,0,0.872921,50.12536,143.2144)"
|
||||
id="g5908_1_">
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
d="M 186.90065,-141.46002 C 186.90623,-132.77923 179.87279,-125.73852 171.19257,-125.73291 C 162.51235,-125.72736 155.47051,-132.76025 155.46547,-141.44098 C 155.46547,-141.44714 155.46547,-141.45331 155.46547,-141.46002 C 155.46043,-150.14081 162.49333,-157.18152 171.17355,-157.18658 C 179.8549,-157.19213 186.89561,-150.15924 186.90065,-141.47845 C 186.90065,-141.4729 186.90065,-141.46619 186.90065,-141.46002 z"
|
||||
rx="22.939548"
|
||||
type="arc"
|
||||
cy="264.3577"
|
||||
ry="22.939548"
|
||||
cx="296.35416"
|
||||
id="path5906_1_" />
|
||||
<g
|
||||
transform="translate(-289.6157,99.0653)"
|
||||
id="g5706_1_">
|
||||
<path
|
||||
d="M 473.57574,-253.32751 C 477.06115,-249.8421 478.80413,-245.5736 478.80413,-240.52532 C 478.80413,-235.47594 477.09136,-231.25329 473.66582,-227.85741 C 470.03051,-224.28081 465.734,-222.49309 460.77635,-222.49309 C 455.87858,-222.49309 451.65648,-224.26628 448.11122,-227.81261 C 444.56541,-231.35845 442.79277,-235.59563 442.79277,-240.52532 C 442.79277,-245.45391 444.56541,-249.7213 448.11122,-253.32751 C 451.56642,-256.81402 455.7885,-258.557 460.77635,-258.557 C 465.82465,-258.55701 470.09039,-256.81403 473.57574,-253.32751 z M 450.45776,-250.98267 C 447.51104,-248.00629 446.03823,-244.51978 446.03823,-240.52033 C 446.03823,-236.52198 447.49651,-233.06507 450.41247,-230.14966 C 453.32897,-227.23316 456.80096,-225.77545 460.82952,-225.77545 C 464.85808,-225.77545 468.35967,-227.24768 471.33605,-230.19385 C 474.16198,-232.9303 475.57549,-236.37091 475.57549,-240.52033 C 475.57549,-244.63837 474.13903,-248.13379 471.26781,-251.00501 C 468.39714,-253.87568 464.9179,-255.31159 460.82952,-255.31159 C 456.74112,-255.31158 453.28314,-253.86841 450.45776,-250.98267 z M 458.21225,-242.27948 C 457.76196,-243.26117 457.08795,-243.75232 456.18903,-243.75232 C 454.59986,-243.75232 453.80558,-242.68225 453.80558,-240.54321 C 453.80558,-238.40368 454.59986,-237.33471 456.18903,-237.33471 C 457.23841,-237.33471 457.98795,-237.85546 458.43769,-238.89922 L 460.64045,-237.72625 C 459.59052,-235.86077 458.01536,-234.92779 455.91496,-234.92779 C 454.29506,-234.92779 452.99733,-235.42449 452.0229,-236.4168 C 451.0468,-237.41021 450.56016,-238.77953 450.56016,-240.52532 C 450.56016,-242.24035 451.06245,-243.60186 452.06764,-244.61034 C 453.07283,-245.61888 454.32466,-246.12291 455.82545,-246.12291 C 458.04557,-246.12291 459.63526,-245.24803 460.59626,-243.50005 L 458.21225,-242.27948 z M 468.57562,-242.27948 C 468.12475,-243.26117 467.46417,-243.75232 466.5932,-243.75232 C 464.97217,-243.75232 464.16107,-242.68225 464.16107,-240.54321 C 464.16107,-238.40368 464.97217,-237.33471 466.5932,-237.33471 C 467.64429,-237.33471 468.38037,-237.85546 468.80048,-238.89922 L 471.05249,-237.72625 C 470.00421,-235.86077 468.43127,-234.92779 466.33478,-234.92779 C 464.7171,-234.92779 463.42218,-235.42449 462.44831,-236.4168 C 461.47614,-237.41021 460.98896,-238.77953 460.98896,-240.52532 C 460.98896,-242.24035 461.48341,-243.60186 462.47181,-244.61034 C 463.45966,-245.61888 464.71711,-246.12291 466.24531,-246.12291 C 468.4615,-246.12291 470.04896,-245.24803 471.0066,-243.50005 L 468.57562,-242.27948 z"
|
||||
id="path5708_1_" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g275">
|
||||
<circle
|
||||
style="fill:#ffffff"
|
||||
sodipodi:ry="10.80664"
|
||||
sodipodi:rx="10.80664"
|
||||
sodipodi:cy="15.31348"
|
||||
sodipodi:cx="255.55124"
|
||||
id="circle277"
|
||||
r="10.80664"
|
||||
cy="15.31348"
|
||||
cx="255.55124" />
|
||||
<g
|
||||
id="g279">
|
||||
<path
|
||||
id="path281"
|
||||
d="M 258.67819,12.18701 C 258.67819,11.77051 258.3403,11.4331 257.92526,11.4331 L 253.15182,11.4331 C 252.73678,11.4331 252.39889,11.7705 252.39889,12.18701 L 252.39889,16.95996 L 253.72994,16.95996 L 253.72994,22.61182 L 257.34713,22.61182 L 257.34713,16.95996 L 258.67818,16.95996 L 258.67818,12.18701 L 258.67819,12.18701 z" />
|
||||
<circle
|
||||
sodipodi:ry="1.63281"
|
||||
sodipodi:rx="1.63281"
|
||||
sodipodi:cy="9.1723604"
|
||||
sodipodi:cx="255.53854"
|
||||
id="circle283"
|
||||
r="1.63281"
|
||||
cy="9.1723604"
|
||||
cx="255.53854" />
|
||||
</g>
|
||||
<path
|
||||
style="fill-rule:evenodd"
|
||||
id="path285"
|
||||
d="M 255.5239,3.40723 C 252.29148,3.40723 249.55515,4.53516 247.31589,6.79102 C 245.01804,9.12452 243.8696,11.88672 243.8696,15.07569 C 243.8696,18.26466 245.01804,21.00733 247.31589,23.30225 C 249.61374,25.59668 252.35007,26.74414 255.5239,26.74414 C 258.73679,26.74414 261.52195,25.58789 263.87742,23.27295 C 266.09715,21.07568 267.2075,18.34326 267.2075,15.07568 C 267.2075,11.8081 266.07762,9.04687 263.8198,6.79101 C 261.56003,4.53516 258.79538,3.40723 255.5239,3.40723 z M 255.55319,5.50684 C 258.20163,5.50684 260.45065,6.44092 262.30026,8.30811 C 264.1694,10.15528 265.10397,12.41114 265.10397,15.07569 C 265.10397,17.75928 264.18893,19.98633 262.35885,21.75587 C 260.43014,23.66212 258.16256,24.61476 255.55319,24.61476 C 252.94284,24.61476 250.69381,23.67189 248.80612,21.78517 C 246.91647,19.89845 245.97311,17.66212 245.97311,15.0757 C 245.97311,12.48879 246.92721,10.23341 248.83541,8.30812 C 250.6655,6.44092 252.90475,5.50684 255.55319,5.50684 z"
|
||||
clip-rule="evenodd" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 11 KiB |
4116
fusion19/artwork/intro.svg
Normal file
After Width: | Height: | Size: 3 MiB |
253856
fusion19/artwork/outro.svg
Normal file
After Width: | Height: | Size: 17 MiB |
1
fusion19/artwork/pause.svg
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../voc/artwork/pause.svg
|
204
jh19-rostock/__init__.py
Normal file
|
@ -0,0 +1,204 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
|
||||
from renderlib import *
|
||||
from easing import *
|
||||
from collections import deque
|
||||
|
||||
# Please EDIT this URL for each local event of Jugend hackt! ### URL to Schedule-XML
|
||||
scheduleUrl = 'https://gist.githubusercontent.com/danimo/9c4cd61461435791b205d2b0613ec6a9/raw/5456a77594917aa4f960a48204b580d838189405/schedule.xml'
|
||||
|
||||
# For (really) too long titles
|
||||
titlemap = {
|
||||
# 26: "VKS",
|
||||
}
|
||||
|
||||
personmap = {
|
||||
# 20 : "",
|
||||
}
|
||||
|
||||
def introFrames(parameters):
|
||||
# 8 Sekunden
|
||||
|
||||
# 2 Sekunden Fadein logo und icongroup
|
||||
frames = int(2*fps)
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('background', 'style', 'opacity', 1),
|
||||
('logo', 'style', 'opacity', "%.4f" % easeInCubic(i, 0, 1, frames)),
|
||||
('icongroup', 'style', 'opacity', "%.4f" % easeInCubic(i, 0, 1, frames)),
|
||||
('alpaca', 'style', 'opacity', 0),
|
||||
('text-bg', 'style', 'opacity', 0),
|
||||
('projectname', 'style', 'opacity', 0),
|
||||
('prenames', 'style', 'opacity', 0),
|
||||
)
|
||||
|
||||
# 1 Sekunden Fadein alpaca und text-bg
|
||||
frames = 1*fps
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('background', 'style', 'opacity', 1),
|
||||
('logo', 'style', 'opacity', 1),
|
||||
('icongroup', 'style', 'opacity', 1),
|
||||
('alpaca', 'style', 'opacity', "%.4f" % easeInCubic(i, 0, 1, frames)),
|
||||
('text-bg', 'style', 'opacity', "%.4f" % easeInCubic(i, 0, 1, frames)),
|
||||
('projectname', 'style', 'opacity', 0),
|
||||
('prenames', 'style', 'opacity', 0),
|
||||
)
|
||||
|
||||
# 5 Sekunden Fadein #hack hack hack# projectname + prenames DIREKT einblenden, weil die Schriftart sich nicht faden lässt
|
||||
frames = 5*fps
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('background', 'style', 'opacity', 1),
|
||||
('logo', 'style', 'opacity', 1),
|
||||
('icongroup', 'style', 'opacity', 1),
|
||||
('alpaca', 'style', 'opacity', 1),
|
||||
('text-bg', 'style', 'opacity', 1),
|
||||
('projectname', 'style', 'opacity', 1),
|
||||
('prenames', 'style', 'opacity', 1),
|
||||
)
|
||||
|
||||
def outroFrames(parameters):
|
||||
# 5 Sekunden
|
||||
|
||||
# 1 Sekunden Fadein logo
|
||||
frames = int(1*fps)
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('background', 'style', 'opacity', 1),
|
||||
('logo', 'style', 'opacity', "%.4f" % easeInCubic(i, 0, 1, frames)),
|
||||
('licensegroup', 'style', 'opacity', 0),
|
||||
('logogroup', 'style', 'opacity', 0),
|
||||
)
|
||||
|
||||
# 1 Sekunden Fadein licensegroup
|
||||
frames = 1*fps
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('background', 'style', 'opacity', 1),
|
||||
('logo', 'style', 'opacity', 1),
|
||||
('licensegroup', 'style', 'opacity', "%.4f" % easeInCubic(i, 0, 1, frames)),
|
||||
('logogroup', 'style', 'opacity', 0),
|
||||
)
|
||||
|
||||
# 1 Sekunden Fadein logogroup
|
||||
frames = 1*fps
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('background', 'style', 'opacity', 1),
|
||||
('logo', 'style', 'opacity', 1),
|
||||
('licensegroup', 'style', 'opacity', 1),
|
||||
('logogroup', 'style', 'opacity', "%.4f" % easeInCubic(i, 0, 1, frames)),
|
||||
)
|
||||
|
||||
# 2 Sekunden stehen bleiben
|
||||
frames = 2*fps
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('background', 'style', 'opacity', 1),
|
||||
('logo', 'style', 'opacity', 1),
|
||||
('licensegroup', 'style', 'opacity', 1),
|
||||
('logogroup', 'style', 'opacity', 1),
|
||||
)
|
||||
def backgroundFrames(parameters):
|
||||
# 20 Sekunden
|
||||
|
||||
# 10 Sekunden alpaca einblenden
|
||||
frames = 10*fps
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('background', 'style', 'opacity', 1),
|
||||
('alpaca', 'style', 'opacity', "%.4f" % easeInCubic(i, 0.25, 1, frames)),
|
||||
)
|
||||
|
||||
# 10 Sekunden alpaca ausblenden
|
||||
frames = 10*fps
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('background', 'style', 'opacity', 1),
|
||||
('alpaca', 'style', 'opacity', "%.4f" % easeInCubic(i, 1, -0.75, frames)),
|
||||
)
|
||||
|
||||
|
||||
def pauseFrames(parameters):
|
||||
# 6 Sekunden
|
||||
|
||||
# 3 Sekunden alpaca einblenden
|
||||
frames = 3*fps
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('pause', 'style', 'opacity', "%.4f" % easeInCubic(i, 1, -0.75, frames)),
|
||||
('alpaca', 'style', 'opacity', "%.4f" % easeInCubic(i, 0.25, 0.75, frames)),
|
||||
)
|
||||
|
||||
# 3 Sekunden alpaca ausblenden
|
||||
frames = 3*fps
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('pause', 'style', 'opacity', "%.4f" % easeInCubic(i, 0.25, 0.75, frames)),
|
||||
('alpaca', 'style', 'opacity', "%.4f" % easeInCubic(i, 1, -0.75, frames)),
|
||||
)
|
||||
|
||||
def debug():
|
||||
s1 = 'Lorem, Ipsum, Ad Dolor... '
|
||||
s2 = 'Lorem, Ipsum, Ad Dolor, Sit, Nomen, Est, Omen, Urbi et Orbi... '
|
||||
render(
|
||||
'intro.svg',
|
||||
'../intro.ts',
|
||||
introFrames,
|
||||
{
|
||||
'$PROJECTNAME': s1.upper(),
|
||||
'$prenames': s2,
|
||||
}
|
||||
)
|
||||
|
||||
render(
|
||||
'outro.svg',
|
||||
'../outro.ts',
|
||||
outroFrames
|
||||
)
|
||||
|
||||
# render(
|
||||
# 'background.svg',
|
||||
# '../background.ts',
|
||||
# backgroundFrames
|
||||
# )
|
||||
#
|
||||
# render('pause.svg',
|
||||
# '../pause.ts',
|
||||
# pauseFrames
|
||||
# )
|
||||
#
|
||||
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
|
||||
projectname = event['title']
|
||||
id = event['id']
|
||||
queue.put(Rendertask(
|
||||
infile = 'intro.svg',
|
||||
outfile = str(event['id'])+".ts",
|
||||
sequence = introFrames,
|
||||
parameters = {
|
||||
# '$id': event['id'],
|
||||
'$PROJECTNAME': titlemap[id].upper() if id in titlemap else projectname.upper(),
|
||||
# '$subtitle': event['subtitle'],
|
||||
'$prenames': personmap[id] if id in personmap else event['personnames']
|
||||
}
|
||||
))
|
||||
|
||||
# place a task for the outro into the queue
|
||||
queue.put(Rendertask(
|
||||
infile = 'outro.svg',
|
||||
outfile = 'outro.ts',
|
||||
sequence = outroFrames
|
||||
))
|
3437
jh19-rostock/artwork/intro.svg
Normal file
After Width: | Height: | Size: 86 KiB |
1999
jh19-rostock/artwork/outro.svg
Normal file
After Width: | Height: | Size: 99 KiB |
|
@ -70,6 +70,10 @@ def pauseFrames(args):
|
|||
)
|
||||
|
||||
def debug():
|
||||
render('outro.svg',
|
||||
'../outro.ts',
|
||||
outroFrames
|
||||
)
|
||||
render('intro.svg',
|
||||
'../intro.ts',
|
||||
introFrames,
|
||||
|
@ -80,12 +84,6 @@ def debug():
|
|||
'$personnames': 'Alexander Chemeris + Harald Welte'
|
||||
}
|
||||
)
|
||||
|
||||
render('outro.svg',
|
||||
'../outro.ts',
|
||||
outroFrames
|
||||
)
|
||||
|
||||
render(
|
||||
'background.svg',
|
||||
'../background.ts',
|
||||
|
@ -97,7 +95,6 @@ def debug():
|
|||
pauseFrames
|
||||
)
|
||||
|
||||
|
||||
def tasks(queue, args, idlist, skiplist):
|
||||
# iterate over all events extracted from the schedule xml-export
|
||||
for event in events(scheduleUrl):
|
||||
|
|
44
renderlib.py
|
@ -162,7 +162,7 @@ def rendertask(task):
|
|||
# write the generated svg-text into the output-file
|
||||
fp.write(etree.tostring(svg, encoding='unicode'))
|
||||
|
||||
if task.outfile.endswith('.ts') or task.outfile.endswith('.mov'):
|
||||
if task.outfile.endswith('.ts') or task.outfile.endswith('.mov') or task.outfile.endswith('.mkv'):
|
||||
width = 1920
|
||||
height = 1080
|
||||
else:
|
||||
|
@ -216,6 +216,8 @@ def rendertask(task):
|
|||
elif task.outfile.endswith('.mov'):
|
||||
cmd = 'cd {0} && '.format(task.workdir)
|
||||
cmd += 'ffmpeg -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -f image2 -i .frames/%04d.png -r 25 -shortest -c:v qtrle -f mov "{0}"'.format(task.outfile)
|
||||
elif task.outfile.endswith('.mkv'):
|
||||
cmd = 'cd {0} && ffmpeg -ar 48000 -ac 2 -f s16le -i /dev/zero -f image2 -i .frames/%04d.png -aspect 16:9 -c copy -shortest "{1}"'.format(task.workdir, task.outfile)
|
||||
else:
|
||||
cmd = 'cd {0} && ffmpeg -ar 48000 -ac 2 -f s16le -i /dev/zero -f image2 -i .frames/%04d.png -target pal-dv -aspect 16:9 -shortest "{1}"'.format(task.workdir, task.outfile)
|
||||
|
||||
|
@ -238,7 +240,7 @@ def rendertask(task):
|
|||
# Download the Events-Schedule and parse all Events out of it. Yield a tupel for each Event
|
||||
|
||||
|
||||
def events(scheduleUrl, titlemap={}):
|
||||
def downloadSchedule(scheduleUrl):
|
||||
print("downloading schedule")
|
||||
|
||||
# download the schedule
|
||||
|
@ -249,8 +251,41 @@ def events(scheduleUrl, titlemap={}):
|
|||
|
||||
# parse into ElementTree
|
||||
parser = etree.XMLParser(huge_tree=True)
|
||||
schedule = etree.fromstring(xml, parser)
|
||||
return etree.fromstring(xml, parser)
|
||||
|
||||
def persons(scheduleUrl, personmap={}, taglinemap={}):
|
||||
schedule = downloadSchedule(scheduleUrl)
|
||||
# iterate all days
|
||||
for day in schedule.iter('day'):
|
||||
# iterate all rooms
|
||||
for room in day.iter('room'):
|
||||
# iterate events on that day in this room
|
||||
for event in room.iter('event'):
|
||||
# aggregate names of the persons holding this talk
|
||||
persons_seen = []
|
||||
if event.find('persons') is not None:
|
||||
for person in event.find('persons').iter('person'):
|
||||
id = int(person.get("id"))
|
||||
person = re.sub(r'\s+', ' ', person.text).strip()
|
||||
match = re.search(r'\((.*?)\)', person)
|
||||
tagline = ''
|
||||
if not match is None:
|
||||
tagline = match.group(1)
|
||||
person = person.split(" (")[0]
|
||||
if id in taglinemap:
|
||||
tagline = taglinemap[id]
|
||||
if id in personmap:
|
||||
person = personmap[id]
|
||||
if not id in persons_seen:
|
||||
persons_seen.append(id)
|
||||
yield {
|
||||
'id': id,
|
||||
'person': person,
|
||||
'tagline': tagline
|
||||
}
|
||||
|
||||
def events(scheduleUrl, titlemap={}):
|
||||
schedule = downloadSchedule(scheduleUrl)
|
||||
# iterate all days
|
||||
for day in schedule.iter('day'):
|
||||
# iterate all rooms
|
||||
|
@ -277,7 +312,6 @@ def events(scheduleUrl, titlemap={}):
|
|||
subtitle = re.sub(r'\s+', ' ', event.find('subtitle').text).strip()
|
||||
else:
|
||||
subtitle = ''
|
||||
|
||||
# yield a tupel with the event-id, event-title and person-names
|
||||
yield {
|
||||
'day': day.attrib['index'],
|
||||
|
@ -288,7 +322,7 @@ def events(scheduleUrl, titlemap={}):
|
|||
'personnames': ', '.join(personnames),
|
||||
'room': room.attrib['name'],
|
||||
'track': event.find('track').text,
|
||||
'url': event.find('url').text
|
||||
#'url': event.find('url').text
|
||||
}
|
||||
|
||||
|
||||
|
|