From 83190a2e551a3e616e77d974655cc04d936a9451 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Sat, 14 Dec 2019 22:50:23 +0100 Subject: [PATCH] Add example inserts for froscon2019 --- froscon2019/__init__.py | 31 +++++++- froscon2019/artwork/insert.svg | 130 +++++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+), 1 deletion(-) create mode 100644 froscon2019/artwork/insert.svg diff --git a/froscon2019/__init__.py b/froscon2019/__init__.py index bb4681d..6b77980 100644 --- a/froscon2019/__init__.py +++ b/froscon2019/__init__.py @@ -6,6 +6,13 @@ from renderlib import * from easing import * import svg.path + +personmap = { +} + +taglinemap = { +} + # URL to Schedule-XML scheduleUrl = 'https://programm.froscon.de/2019/schedule.xml' @@ -206,7 +213,8 @@ def tasks(queue, args, idlist, skiplist): continue 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( infile = 'intro.svg', 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: # place a task for the outro into the queue queue.put(Rendertask( diff --git a/froscon2019/artwork/insert.svg b/froscon2019/artwork/insert.svg new file mode 100644 index 0000000..c71e629 --- /dev/null +++ b/froscon2019/artwork/insert.svg @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + $TAGLINE $PERSON +