Add example inserts for froscon2019

This commit is contained in:
Daniel Molkentin 2019-12-14 22:50:23 +01:00
parent f1da7544cb
commit 83190a2e55
2 changed files with 160 additions and 1 deletions

View file

@ -6,6 +6,13 @@ from renderlib import *
from easing import * from easing import *
import svg.path import svg.path
personmap = {
}
taglinemap = {
}
# URL to Schedule-XML # URL to Schedule-XML
scheduleUrl = 'https://programm.froscon.de/2019/schedule.xml' scheduleUrl = 'https://programm.froscon.de/2019/schedule.xml'
@ -206,7 +213,8 @@ def tasks(queue, args, idlist, skiplist):
continue continue
if (event['id'] in idlist or not idlist) and not 'intro' in skiplist: if (event['id'] in idlist or not idlist) and not 'intro' in skiplist:
# generate a task description and put them into the queue # generate a task description and put them into the queue
queue.put(Rendertask( queue.put(Rendertask(
infile = 'intro.svg', infile = 'intro.svg',
outfile = str(event['id'])+".ts", outfile = str(event['id'])+".ts",
@ -219,6 +227,27 @@ def tasks(queue, args, idlist, skiplist):
} }
)) ))
idx=0
for idx, person in enumerate(persons(scheduleUrl, personmap, taglinemap, event['id'])):
queue.put(Rendertask(
infile = 'insert.svg',
outfile = 'event_{}_person_{}.png'.format(str(event['id']), str(person['id'])),
parameters = {
'$PERSON': person['person'],
'$TAGLINE': person['tagline'],
}
))
if idx > 0:
queue.put(Rendertask(
infile = 'insert.svg',
outfile = 'event_{}_persons.png'.format(str(event['id'])),
parameters = {
'$PERSON': event['personnames'],
'$TAGLINE': '',
}
))
if not 'outro' in skiplist: if not 'outro' in skiplist:
# place a task for the outro into the queue # place a task for the outro into the queue
queue.put(Rendertask( queue.put(Rendertask(

View file

@ -0,0 +1,130 @@
<?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="1920"
height="1080"
viewBox="0 0 508 285.75001"
version="1.1"
id="svg8"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="insert.svg"
inkscape:export-filename="/home/peter/DG-test.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="1256.4581"
inkscape:cy="388.95774"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:pagecheckerboard="true"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1920"
inkscape:window-height="1080"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0">
<sodipodi:guide
position="71.059524,78.61905"
orientation="0,1"
id="guide860"
inkscape:locked="false" />
<sodipodi:guide
position="55.5625,30.616073"
orientation="0,1"
id="guide862"
inkscape:locked="false" />
<sodipodi:guide
position="136.44941,128.13393"
orientation="1,0"
id="guide864"
inkscape:locked="false" />
<sodipodi:guide
position="50.64881,98.273811"
orientation="1,0"
id="guide1167"
inkscape:locked="false" />
</sodipodi:namedview>
<metadata
id="metadata5">
<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="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-11.249983)">
<rect
style="opacity:0.9;fill:#204a87;fill-opacity:1;stroke:#00006a;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0"
id="rect850"
width="466.04462"
height="65.767853"
x="42.33334"
y="208.17557" />
<flowRoot
xml:space="preserve"
id="flowRoot986"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:53.33333206px;line-height:125%;font-family:monospace;-inkscape-font-specification:'monospace, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ececec;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
transform="matrix(0.26458334,0,0,0.26458334,-88.522073,42.999983)"><flowRegion
id="flowRegion988"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:53.33333206px;font-family:monospace;-inkscape-font-specification:'monospace, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ececec"><rect
id="rect990"
width="1694.2856"
height="61.428589"
x="525.71429"
y="782.85712"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:53.33333206px;font-family:monospace;-inkscape-font-specification:'monospace, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ececec" /></flowRegion><flowPara
id="flowPara992"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:53.33333206px;font-family:monospace;-inkscape-font-specification:'monospace, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ececec">$TAGLINE</flowPara></flowRoot> <flowRoot
xml:space="preserve"
id="flowRoot994"
style="fill:black;stroke:none;stroke-opacity:1;stroke-width:1px;stroke-linejoin:miter;stroke-linecap:butt;fill-opacity:1;font-family:sans-serif;font-style:normal;font-weight:normal;font-size:40px;line-height:125%;letter-spacing:0px;word-spacing:0px"><flowRegion
id="flowRegion996"><rect
id="rect998"
width="1222.8572"
height="65.714287"
x="514.28571"
y="782.85712" /></flowRegion><flowPara
id="flowPara1000" /></flowRoot> <flowRoot
xml:space="preserve"
id="flowRoot1002"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:66.66666412px;line-height:125%;font-family:monospace;-inkscape-font-specification:'monospace, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#e6e6e6;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
transform="matrix(0.26458334,0,0,0.26458334,-69.925638,12.761888)"><flowRegion
id="flowRegion1004"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:66.66666412px;font-family:monospace;-inkscape-font-specification:'monospace, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#e6e6e6"><rect
id="rect1006"
width="1697.1427"
height="87.142868"
x="454.28571"
y="782.85712"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:66.66666412px;font-family:monospace;-inkscape-font-specification:'monospace, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#e6e6e6" /></flowRegion><flowPara
id="flowPara1008"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:80px;font-family:monospace;-inkscape-font-specification:'monospace, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#e6e6e6">$PERSON</flowPara></flowRoot> </g>
</svg>

After

Width:  |  Height:  |  Size: 7.2 KiB