1C2: Add preliminary outro

This commit is contained in:
Florian Zeitz 2015-05-14 18:46:58 +02:00
parent 62306c84e5
commit 0e586d91c7
3 changed files with 304 additions and 31 deletions

View file

@ -3,6 +3,14 @@
from renderlib import * from renderlib import *
from itertools import zip_longest from itertools import zip_longest
# URL to Schedule-XML
scheduleUrl = 'http://chaos.cologne/Fahrplan/schedule.xml'
# For (really) too long titles
titlemap = {
}
def introFramesLight(p): def introFramesLight(p):
frames = int(1.5*fps) frames = int(1.5*fps)
max_opac = 0.7 max_opac = 0.7
@ -70,12 +78,12 @@ def introFrameText(p):
] ]
def introFrames(p): def introFrames(p):
for e in zip_longest(zip(introFramesDot(p), introFramesLight(p)), introFrameText(p), fillvalue=[('text', 'style', 'opacity', '1')]): for (i, j), z in zip_longest(zip(introFramesDot(p), introFramesLight(p)), introFrameText(p), fillvalue=[]):
yield e[0][0] + e[0][1] + e[1] yield i + j + z
def outroFrames(p): def outroFrames(p):
# 5 Sekunden stehen bleiben # 5 Sekunden stehen bleiben
frames = 1*fps frames = 5*fps
for i in range(0, frames): for i in range(0, frames):
yield [] yield []
@ -92,11 +100,30 @@ def debug():
} }
) )
# render( render(
# 'outro.svg', 'outro.svg',
# '../outro.ts', '../outro.ts',
# outroFrames outroFrames
# ) )
def tasks(queue): def tasks(queue, args):
raise NotImplementedError('call with --debug to render your intro/outro') # iterate over all events extracted from the schedule xml-export
for event in events(scheduleUrl):
# generate a task description and put them 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'],
'$personnames': event['personnames']
}
))
queue.put(Rendertask(
infile = 'outro.svg',
outfile = 'outro.ts',
sequence = outroFrames
))

View file

@ -9,26 +9,10 @@
id="style4"> id="style4">
path { fill: #000; stroke-width: 106px; stroke-opacity: 0 } path { fill: #000; stroke-width: 106px; stroke-opacity: 0 }
#bg { fill: #fff } #bg { fill: #fff }
#one, #cee, #two { #one { stroke: #f00 }
animation-duration: 5s; #cee { stroke: #0f0 }
animation-iteration-count: infinite; #two { stroke: #66f }
} #dot1 { fill: #f0f }
#one {
stroke: #f00;
animation-name: red;
}
#cee {
stroke: #0f0;
animation-name: green;
}
#two {
stroke: #66f;
animation-name: blue;
}
#dot1 {
fill: #f0f;
animation: dotwalk 23s linear 5s infinite alternate;
}
</style> </style>
<rect <rect
style="opacity:1;fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" style="opacity:1;fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
@ -75,6 +59,6 @@
<flowPara id="flowPara4170" style="font-weight:bold">1. Chaos Cologne</flowPara> <flowPara id="flowPara4170" style="font-weight:bold">1. Chaos Cologne</flowPara>
<flowPara style="fill:#66f" id="flowPara4172">$personnames</flowPara> <flowPara style="fill:#66f" id="flowPara4172">$personnames</flowPara>
<flowPara style="fill:#0f0" id="flowPara4174">$title</flowPara> <flowPara style="fill:#0f0" id="flowPara4174">$title</flowPara>
<flowPara style="fill:#f00" id="flowPara3357">$subtitle</flowPara> <flowPara style="font-size:40px;fill:#f00" id="flowPara3357">$subtitle</flowPara>
</flowRoot> </flowRoot>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

262
1c2/artwork/outro.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 26 KiB