migrate to new Rendertask-Class
This commit is contained in:
parent
81b0c60fa6
commit
d11886698a
6 changed files with 100 additions and 87 deletions
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python3
|
||||||
# -*- coding: UTF-8 -*-
|
|
||||||
|
from renderlib import *
|
||||||
|
|
||||||
def outroFrames():
|
def outroFrames():
|
||||||
# 8 Sekunden
|
# 8 Sekunden
|
||||||
|
@ -79,15 +80,15 @@ def debug():
|
||||||
|
|
||||||
def tasks(queue):
|
def tasks(queue):
|
||||||
# generate a task description and put them into the queue
|
# generate a task description and put them into the queue
|
||||||
queue.put((
|
queue.put(Rendertask(
|
||||||
'intro.svg',
|
infile = 'intro.svg',
|
||||||
"intro.dv",
|
outfile = "intro.dv",
|
||||||
introFrames
|
sequence = introFrames
|
||||||
))
|
))
|
||||||
|
|
||||||
# place a task for the outro into the queue
|
# place a task for the outro into the queue
|
||||||
queue.put((
|
queue.put(Rendertask(
|
||||||
'outro.svg',
|
infile = 'outro.svg',
|
||||||
'outro.dv',
|
outfile = 'outro.dv',
|
||||||
outroFrames
|
sequence = outroFrames
|
||||||
))
|
))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python3
|
||||||
# -*- coding: UTF-8 -*-
|
|
||||||
|
|
||||||
|
from renderlib import *
|
||||||
import math
|
import math
|
||||||
|
|
||||||
# URL to Schedule-XML
|
# URL to Schedule-XML
|
||||||
|
@ -118,14 +118,14 @@ def debug():
|
||||||
|
|
||||||
def tasks(queue):
|
def tasks(queue):
|
||||||
# iterate over all events extracted from the schedule xml-export
|
# iterate over all events extracted from the schedule xml-export
|
||||||
for event in events():
|
for event in events(scheduleUrl):
|
||||||
|
|
||||||
# generate a task description and put them into the queue
|
# generate a task description and put them into the queue
|
||||||
queue.put((
|
queue.put(Rendertask(
|
||||||
'intro.svg',
|
infile = 'intro.svg',
|
||||||
str(event['id'])+".dv",
|
outfile = str(event['id'])+".dv",
|
||||||
introFrames,
|
sequence = introFrames,
|
||||||
{
|
parameters = {
|
||||||
'$id': event['id'],
|
'$id': event['id'],
|
||||||
'$title': event['title'],
|
'$title': event['title'],
|
||||||
'$subtitle': event['subtitle'],
|
'$subtitle': event['subtitle'],
|
||||||
|
@ -134,15 +134,15 @@ def tasks(queue):
|
||||||
))
|
))
|
||||||
|
|
||||||
# place a task for the outro into the queue
|
# place a task for the outro into the queue
|
||||||
queue.put((
|
queue.put(Rendertask(
|
||||||
'outro.svg',
|
infile = 'outro.svg',
|
||||||
'outro.dv',
|
outfile = 'outro.dv',
|
||||||
outroFrames
|
sequence = outroFrames
|
||||||
))
|
))
|
||||||
|
|
||||||
# place the pause-sequence into the queue
|
# place the pause-sequence into the queue
|
||||||
queue.put((
|
queue.put(Rendertask(
|
||||||
'pause.svg',
|
infile = 'pause.svg',
|
||||||
'pause.dv',
|
outfile = 'pause.dv',
|
||||||
pauseFrames
|
sequence = pauseFrames
|
||||||
))
|
))
|
||||||
|
|
|
@ -186,3 +186,15 @@ def tasks(queue):
|
||||||
outfile = 'pause.dv',
|
outfile = 'pause.dv',
|
||||||
sequence = pauseFrames
|
sequence = pauseFrames
|
||||||
))
|
))
|
||||||
|
|
||||||
|
def ticket(ticket):
|
||||||
|
return Rendertask(
|
||||||
|
infile = 'intro.svg',
|
||||||
|
sequence = introFrames,
|
||||||
|
parameters = {
|
||||||
|
'$id': ticket['Fahrplan.ID'],
|
||||||
|
'$title': ticket.get('Fahrplan.Title'),
|
||||||
|
'$subtitle': ticket.get('Fahrplan.Subtitle'),
|
||||||
|
'$personnames': ticket.get('Fahrplan.Person_list')
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
# -*- coding: UTF-8 -*-
|
|
||||||
|
from renderlib import *
|
||||||
|
|
||||||
# URL to Schedule-XML
|
# URL to Schedule-XML
|
||||||
scheduleUrl = 'https://ep2014.europython.eu/schedule.frab.xml'
|
scheduleUrl = 'https://ep2014.europython.eu/schedule.frab.xml'
|
||||||
|
@ -65,32 +66,21 @@ def debug():
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
# render(
|
|
||||||
# 'outro.svg',
|
|
||||||
# '../outro.dv',
|
|
||||||
# outroFrames
|
|
||||||
# )
|
|
||||||
|
|
||||||
# render('pause.svg',
|
|
||||||
# '../pause.dv',
|
|
||||||
# pauseFrames
|
|
||||||
# )
|
|
||||||
|
|
||||||
def tasks(queue):
|
def tasks(queue):
|
||||||
uid = []
|
uid = []
|
||||||
# iterate over all events extracted from the schedule xml-export
|
# iterate over all events extracted from the schedule xml-export
|
||||||
for event in events():
|
for event in events(scheduleUrl):
|
||||||
if event['id'] in uid:
|
if event['id'] in uid:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
uid.append(event['id'])
|
uid.append(event['id'])
|
||||||
|
|
||||||
# generate a task description and put them into the queue
|
# generate a task description and put them into the queue
|
||||||
queue.put((
|
queue.put(Rendertask(
|
||||||
'intro.svg',
|
infile = 'intro.svg',
|
||||||
str(event['id'])+".dv",
|
outfile = str(event['id'])+".dv",
|
||||||
pyconFrames,
|
sequence = pyconFrames,
|
||||||
{
|
parameters = {
|
||||||
'$id': event['id'],
|
'$id': event['id'],
|
||||||
'$title': event['title'],
|
'$title': event['title'],
|
||||||
'$subtitle': event['subtitle'],
|
'$subtitle': event['subtitle'],
|
||||||
|
@ -98,16 +88,14 @@ def tasks(queue):
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
|
|
||||||
# # place a task for the outro into the queue
|
def ticket(ticket):
|
||||||
# queue.put((
|
return Rendertask(
|
||||||
# 'outro.svg',
|
infile = 'intro.svg',
|
||||||
# 'outro.dv',
|
sequence = introFrames,
|
||||||
# outroFrames
|
parameters = {
|
||||||
# ))
|
'$id': ticket['Fahrplan.ID'],
|
||||||
|
'$title': ticket.get('Fahrplan.Title'),
|
||||||
# # place the pause-sequence into the queue
|
'$subtitle': ticket.get('Fahrplan.Subtitle'),
|
||||||
# queue.put((
|
'$personnames': ticket.get('Fahrplan.Person_list')
|
||||||
# 'pause.svg',
|
}
|
||||||
# 'pause.dv',
|
)
|
||||||
# pauseFrames
|
|
||||||
# ))
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python3
|
||||||
# -*- coding: UTF-8 -*-
|
|
||||||
|
|
||||||
|
from renderlib import *
|
||||||
import math
|
import math
|
||||||
|
|
||||||
def pauseFrames():
|
def pauseFrames():
|
||||||
|
@ -34,20 +34,20 @@ def debug():
|
||||||
|
|
||||||
def tasks(queue):
|
def tasks(queue):
|
||||||
# place the pause-sequence into the queue
|
# place the pause-sequence into the queue
|
||||||
queue.put((
|
queue.put(Rendertask(
|
||||||
'pause.svg',
|
infile = 'pause.svg',
|
||||||
'pause.dv',
|
outfile = 'pause.dv',
|
||||||
pauseFrames
|
sequence = pauseFrames
|
||||||
))
|
))
|
||||||
|
|
||||||
queue.put((
|
queue.put(Rendertask(
|
||||||
'nostream.svg',
|
infile = 'nostream.svg',
|
||||||
'nostream.dv',
|
outfile = 'nostream.dv',
|
||||||
pauseFrames
|
sequence = pauseFrames
|
||||||
))
|
))
|
||||||
|
|
||||||
queue.put((
|
queue.put(Rendertask(
|
||||||
'novideo.svg',
|
infile = 'novideo.svg',
|
||||||
'novideo.dv',
|
outfile = 'novideo.dv',
|
||||||
pauseFrames
|
sequence = pauseFrames
|
||||||
))
|
))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python3
|
||||||
# -*- coding: UTF-8 -*-
|
|
||||||
|
|
||||||
|
from renderlib import *
|
||||||
import math
|
import math
|
||||||
|
|
||||||
# URL to Schedule-XML
|
# URL to Schedule-XML
|
||||||
|
@ -139,14 +139,14 @@ def debug():
|
||||||
|
|
||||||
def tasks(queue):
|
def tasks(queue):
|
||||||
# iterate over all events extracted from the schedule xml-export
|
# iterate over all events extracted from the schedule xml-export
|
||||||
for event in events():
|
for event in events(scheduleUrl):
|
||||||
|
|
||||||
# generate a task description and put them into the queue
|
# generate a task description and put them into the queue
|
||||||
queue.put((
|
queue.put(Rendertask(
|
||||||
'intro.svg',
|
infile = 'intro.svg',
|
||||||
str(event['id'])+".dv",
|
outfile = str(event['id'])+".dv",
|
||||||
introFrames,
|
sequence = introFrames,
|
||||||
{
|
parameters = {
|
||||||
'$id': event['id'],
|
'$id': event['id'],
|
||||||
'$title': event['title'],
|
'$title': event['title'],
|
||||||
'$subtitle': event['subtitle'],
|
'$subtitle': event['subtitle'],
|
||||||
|
@ -155,15 +155,27 @@ def tasks(queue):
|
||||||
))
|
))
|
||||||
|
|
||||||
# place a task for the outro into the queue
|
# place a task for the outro into the queue
|
||||||
queue.put((
|
queue.put(Rendertask(
|
||||||
'outro.svg',
|
infile = 'outro.svg',
|
||||||
'outro.dv',
|
outfile = 'outro.dv',
|
||||||
outroFrames
|
sequence = outroFrames
|
||||||
))
|
))
|
||||||
|
|
||||||
# place the pause-sequence into the queue
|
# place the pause-sequence into the queue
|
||||||
queue.put((
|
queue.put(Rendertask(
|
||||||
'pause.svg',
|
infile = 'pause.svg',
|
||||||
'pause.dv',
|
outfile = 'pause.dv',
|
||||||
pauseFrames
|
sequence = pauseFrames
|
||||||
))
|
))
|
||||||
|
|
||||||
|
def ticket(ticket):
|
||||||
|
return Rendertask(
|
||||||
|
infile = 'intro.svg',
|
||||||
|
sequence = introFrames,
|
||||||
|
parameters = {
|
||||||
|
'$id': ticket['Fahrplan.ID'],
|
||||||
|
'$title': ticket.get('Fahrplan.Title'),
|
||||||
|
'$subtitle': ticket.get('Fahrplan.Subtitle'),
|
||||||
|
'$personnames': ticket.get('Fahrplan.Person_list')
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue