nixcon2015: add intro

This commit is contained in:
Florian Larysch 2015-11-12 00:28:43 +01:00
parent ec1ae7d951
commit 74d8aacd4c
2 changed files with 298 additions and 0 deletions

122
nixcon2015/__init__.py Normal file
View file

@ -0,0 +1,122 @@
#!/usr/bin/python3
from renderlib import *
from easing import *
import math
# URL to Schedule-XML
scheduleUrl = 'https://n621.de/fud/nixcon.xml'
# For (really) too long titles
titlemap = {
#708: "Neue WEB-Anwendungen des LGRB Baden-Württemberg im Überblick"
}
def introFrames(params):
move=40
# wait
frames = 1*fps
for i in range(0, frames):
yield (
)
deltas = {}
for segment in range(1, 7):
angle = 60 * (segment - 1)
dist = 1000
dx = -dist * math.cos(math.radians(angle))
dy = -dist * math.sin(math.radians(angle))
deltas[segment] = (dx, dy)
# fly out
frames = int(1.5*fps)
for i in range(0, frames):
placements = []
for segment in range(1, 7):
x = easeInCubic(i, 0, deltas[segment][0], frames)
y = easeInCubic(i, 0, deltas[segment][1], frames)
opacity = 1 - easeInCubic(i, 0, 1, int(0.8*frames))
placements.extend([
('segment%u' % segment, 'attr', 'transform', 'translate(%.4f, %.4f)' % (x, y)),
('segment%u' % segment, 'style', 'opacity', '%.4f' % opacity)
])
logotext_dx = easeInCubic(i, 0, 2000, frames)
logotext_opacity = 1 - easeInCubic(i, 0, 1, 20)
placements.extend([
('logotext', 'attr', 'transform', 'translate(%.4f, 0)' % logotext_dx),
('logotext', 'style', 'opacity', '%.4f' % logotext_opacity),
])
if i > int(frames/2):
sub_frames = frames - int(frames/2)
sub_i = i - int(frames/2)
talk_opacity = easeInCubic(sub_i, 0, 1, sub_frames)
placements.extend([
('title', 'style', 'opacity', '%.4f' % talk_opacity),
('person', 'style', 'opacity', '%.4f' % talk_opacity),
])
yield placements
# wait
frames = int(2.5*fps)
for i in range(0, frames):
yield (
('title', 'style', 'opacity', '%.4f' % 1),
('person', 'style', 'opacity', '%.4f' % 1),
)
def outroFrames(params):
pass
def debug():
#render(
# 'outro.svg',
# '../outro.dv',
# outroFrames
#)
render(
'intro.svg',
'../intro.dv',
introFrames,
{
'$id': 904,
'$title': 'The sorry state of Python packaging and how it reflects in Nix',
'$personnames': 'Domen Kožar'
}
)
def tasks(queue, params):
# iterate over all events extracted from the schedule xml-export
for event in events(scheduleUrl, titlemap):
# 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']
}
))
# place a task for the outro into the queue
#queue.put(Rendertask(
# infile = 'outro.svg',
# outfile = 'outro.dv',
# sequence = outroFrames
#))

View file

@ -0,0 +1,176 @@
<?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="1024"
height="576"
viewBox="0 0 1024 576.00002"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="intro.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#2d3038"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="1.1162109"
inkscape:cx="368.65793"
inkscape:cy="288.00001"
inkscape:document-units="px"
inkscape:current-layer="layer2"
showgrid="false"
units="px"
inkscape:window-width="1600"
inkscape:window-height="1177"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="logo"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-476.36217)"
style="display:inline"
sodipodi:insensitive="true">
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#7ebae4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 311.54316,708.4196 -83.56048,144.71464 -19.5093,-33.0707 22.52007,-38.7574 -44.72456,-0.11753 -9.53177,-16.52496 9.73344,-16.90181 63.66078,0.20094 22.87923,-39.44302 z"
id="segment6"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc"
inkscape:label="#use4863" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#7ebae4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 317.95363,824.10231 167.10679,0.008 -18.88543,33.43088 -44.82492,-0.12423 22.26052,38.79131 -9.54516,16.51723 -19.50414,0.0219 -31.65633,-55.23231 -45.5983,-0.0925 z"
id="segment4"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc"
inkscape:label="#use4865" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#7ebae4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 415.21569,760.69189 -83.54631,-144.72285 38.39474,-0.36017 22.30484,38.88163 22.46405,-38.67385 19.07692,0.008 9.7707,16.88034 -32.00444,55.03137 22.71907,39.53552 z"
id="segment2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc"
inkscape:label="#use4867" />
<path
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0"
id="segment5"
d="m 281.38804,768.03246 83.5463,144.72284 -38.39473,0.36018 -22.30485,-38.88163 -22.46404,38.67385 -19.07693,-0.008 -9.7707,-16.88035 32.00445,-55.03136 -22.71907,-39.53553 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
inkscape:label="#path4873" />
<path
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0"
id="segment1"
d="m 378.42785,704.2563 -167.1068,-0.008 18.88544,-33.43091 44.82491,0.12426 -22.26051,-38.79136 9.54516,-16.51724 19.50413,-0.0215 31.65633,55.23233 45.5983,0.0925 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
inkscape:label="#use4875" />
<path
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0"
id="segment3"
d="m 384.94721,820.27391 83.56049,-144.71459 19.5093,33.07072 -22.52007,38.7574 44.72455,0.11746 9.53177,16.52496 -9.73343,16.90188 -63.66078,-0.201 -22.87923,39.44308 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
inkscape:label="#use4877" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.5px;line-height:125%;font-family:'Yanone Kaffeesatz';-inkscape-font-specification:'Yanone Kaffeesatz, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="717.6535"
y="756.60602"
id="logotext"
sodipodi:linespacing="125%"
inkscape:label="#text4160"><tspan
sodipodi:role="line"
id="tspan4162"
x="717.6535"
y="756.60602"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:70px;font-family:'Architects Daughter';-inkscape-font-specification:'Architects Daughter';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1">NixCon</tspan><tspan
sodipodi:role="line"
x="717.6535"
y="844.10602"
id="tspan4164"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:70px;font-family:'Architects Daughter';-inkscape-font-specification:'Architects Daughter';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1">2015</tspan></text>
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="title"
style="display:inline">
<flowRoot
xml:space="preserve"
id="flowRoot4156"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50px;line-height:125%;font-family:'Open Sans';-inkscape-font-specification:'Open Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"><flowRegion
id="flowRegion4158"><rect
id="rect4160"
width="894.09625"
height="136.17497"
x="86.901138"
y="250.79265"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50px;font-family:'Open Sans';-inkscape-font-specification:'Open Sans';text-align:center;text-anchor:middle" /></flowRegion><flowPara
id="flowPara4162" /></flowRoot> <flowRoot
xml:space="preserve"
id="flowRoot4164"
style="font-style:normal;font-weight:normal;font-size:32px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"><flowRegion
id="flowRegion4166"><rect
id="rect4168"
width="717.60632"
height="197.99126"
x="113.77778"
y="215.85301" /></flowRegion><flowPara
id="flowPara4170" /></flowRoot> <flowRoot
xml:space="preserve"
id="title"
style="font-style:normal;font-weight:normal;font-size:32px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;opacity:0;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
transform="translate(-166.08106,-14.429571)"
inkscape:label="#flowRoot4172"><flowRegion
id="flowRegion4174"><rect
id="rect4176"
width="826.9046"
height="169.32285"
x="264.28696"
y="272.29395" /></flowRegion><flowPara
id="flowPara4178"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50px;font-family:'Open Sans';-inkscape-font-specification:'Open Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1">$title<flowSpan
style="font-size:60px"
id="flowSpan4188" /></flowPara></flowRoot> <flowRoot
xml:space="preserve"
id="person"
style="font-style:normal;font-weight:normal;font-size:35px;line-height:125%;font-family:Sans;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;opacity:0;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
transform="translate(166.31006,77.57043)"
inkscape:label="#flowRoot4180"><flowRegion
id="flowRegion4182"><rect
id="rect4184"
width="608.30792"
height="51.961506"
x="41.21085"
y="112.8259"
style="font-size:35px;text-align:center;text-anchor:middle" /></flowRegion><flowPara
id="flowPara4186"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35px;font-family:'Open Sans';-inkscape-font-specification:'Open Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1">$personnames</flowPara></flowRoot> </g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB