Rename cr to chaosradio, align with datengarten
...and prepare for the day that Chaosradio will have a schedule.xml, too.
BIN
chaosradio/.__init__.py.swp
Normal file
114
chaosradio/__init__.py
Normal file
|
@ -0,0 +1,114 @@
|
||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
from renderlib import *
|
||||||
|
from easing import *
|
||||||
|
|
||||||
|
scheduleUrl = ""
|
||||||
|
|
||||||
|
def introFrames(p):
|
||||||
|
# 8 Sekunden
|
||||||
|
|
||||||
|
# 2 Sekunden Fadein logo
|
||||||
|
frames = int(2*fps)
|
||||||
|
for i in range(0, frames):
|
||||||
|
yield (
|
||||||
|
('logo', 'style', 'opacity', "%.4f" % easeInCubic(i, 0, 1, frames)),
|
||||||
|
('text', 'style', 'opacity', 0),
|
||||||
|
)
|
||||||
|
|
||||||
|
# 3 Sekunden Fadein text
|
||||||
|
frames = 3*fps
|
||||||
|
for i in range(0, frames):
|
||||||
|
yield (
|
||||||
|
('logo', 'style', 'opacity', 1),
|
||||||
|
('text', 'style', 'opacity', "%.4f" % easeInCubic(i, 0, 1, frames)),
|
||||||
|
)
|
||||||
|
|
||||||
|
# 3 Sekunden stehen bleiben
|
||||||
|
frames = 3*fps
|
||||||
|
for i in range(0, frames):
|
||||||
|
yield (
|
||||||
|
('logo', 'style', 'opacity', 1),
|
||||||
|
('text', 'style', 'opacity', 1),
|
||||||
|
)
|
||||||
|
|
||||||
|
def outroFrames(p):
|
||||||
|
# 8 Sekunden
|
||||||
|
|
||||||
|
# 1 Sekunden stehen bleiben
|
||||||
|
frames = int(1*fps)
|
||||||
|
for i in range(0, frames):
|
||||||
|
yield (
|
||||||
|
('logo', 'style', 'opacity', 1),
|
||||||
|
)
|
||||||
|
|
||||||
|
# 4 Sekunde Fadeout Logo
|
||||||
|
frames = 4*fps
|
||||||
|
for i in range(0, frames):
|
||||||
|
yield (
|
||||||
|
('logo', 'style', 'opacity', "%.4f" % easeInCubic(i, 1, -1, frames)),
|
||||||
|
)
|
||||||
|
|
||||||
|
# 1 Sekunden stehen bleiben
|
||||||
|
frames = 1*fps
|
||||||
|
for i in range(0, frames):
|
||||||
|
yield (
|
||||||
|
('logo', 'style', 'opacity', 0),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def debug():
|
||||||
|
render(
|
||||||
|
'intro.svg',
|
||||||
|
'../intro.ts',
|
||||||
|
introFrames,
|
||||||
|
{
|
||||||
|
'$id': '246',
|
||||||
|
'$title': 'Die Gesellschaft für Freiheitsrechte',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
render(
|
||||||
|
'outro.svg',
|
||||||
|
'../outro.ts',
|
||||||
|
outroFrames
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def tasks(queue, args, idlist, skiplist):
|
||||||
|
if scheduleXml == "":
|
||||||
|
raise "Not schedule yet, use --debug for now"
|
||||||
|
|
||||||
|
# iterate over all events extracted from the schedule xml-export
|
||||||
|
for event in events(scheduleUrl):
|
||||||
|
if event['room'] not in ('Saal23'):
|
||||||
|
print("skipping room %s (%s [%s])" % (event['room'], event['title'], event['id']))
|
||||||
|
continue
|
||||||
|
if not (idlist==[]):
|
||||||
|
if 000000 in idlist:
|
||||||
|
print("skipping id (%s [%s])" % (event['title'], event['id']))
|
||||||
|
continue
|
||||||
|
if int(event['id']) not in idlist:
|
||||||
|
print("skipping id (%s [%s])" % (event['title'], event['id']))
|
||||||
|
continue
|
||||||
|
|
||||||
|
# generate a task description and put it into the queue
|
||||||
|
queue.put(Rendertask(
|
||||||
|
infile = 'intro.svg',
|
||||||
|
outfile = str(event['id'])+".ts",
|
||||||
|
sequence = introFrames,
|
||||||
|
parameters = {
|
||||||
|
'$id': event['id'],
|
||||||
|
'$title': event['subtitle'],
|
||||||
|
'$person': event['personnames']
|
||||||
|
}
|
||||||
|
))
|
||||||
|
|
||||||
|
# place a task for the outro into the queue
|
||||||
|
if not "out" in skiplist:
|
||||||
|
queue.put(Rendertask(
|
||||||
|
infile = 'outro.svg',
|
||||||
|
outfile = 'outro.ts',
|
||||||
|
sequence = outroFrames
|
||||||
|
))
|
||||||
|
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
|
@ -251,11 +251,11 @@
|
||||||
x="959.94507"
|
x="959.94507"
|
||||||
y="639.08167"
|
y="639.08167"
|
||||||
id="tspan3833"
|
id="tspan3833"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L'">CR217</tspan><tspan
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L'">CR$id</tspan><tspan
|
||||||
sodipodi:role="line"
|
sodipodi:role="line"
|
||||||
x="959.94507"
|
x="959.94507"
|
||||||
y="730.83075"
|
y="730.83075"
|
||||||
id="tspan3842"
|
id="tspan3842"
|
||||||
style="font-style:italic;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'Nimbus Roman No9 L';-inkscape-font-specification:'Nimbus Roman No9 L Italic'">Professional Hackers</tspan></text>
|
style="font-style:italic;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'Nimbus Roman No9 L';-inkscape-font-specification:'Nimbus Roman No9 L Italic'">$title</tspan></text>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
111
cr/__init__.py
|
@ -1,111 +0,0 @@
|
||||||
#!/usr/bin/python3
|
|
||||||
|
|
||||||
from renderlib import *
|
|
||||||
from easing import *
|
|
||||||
|
|
||||||
def outroFrames(p):
|
|
||||||
# 8 Sekunden
|
|
||||||
|
|
||||||
# 1 Sekunden stehen bleiben
|
|
||||||
frames = int(1*fps)
|
|
||||||
for i in range(0, frames):
|
|
||||||
yield (
|
|
||||||
('logo', 'style', 'opacity', 1),
|
|
||||||
)
|
|
||||||
|
|
||||||
# 4 Sekunde Fadeout Logo
|
|
||||||
frames = 4*fps
|
|
||||||
for i in range(0, frames):
|
|
||||||
yield (
|
|
||||||
('logo', 'style', 'opacity', "%.4f" % easeInCubic(i, 1, -1, frames)),
|
|
||||||
)
|
|
||||||
|
|
||||||
# 1 Sekunden stehen bleiben
|
|
||||||
frames = 1*fps
|
|
||||||
for i in range(0, frames):
|
|
||||||
yield (
|
|
||||||
('logo', 'style', 'opacity', 0),
|
|
||||||
)
|
|
||||||
|
|
||||||
def introFrames(p):
|
|
||||||
# 8 Sekunden
|
|
||||||
|
|
||||||
# 2 Sekunden Fadein logo
|
|
||||||
frames = int(2*fps)
|
|
||||||
for i in range(0, frames):
|
|
||||||
yield (
|
|
||||||
('logo', 'style', 'opacity', "%.4f" % easeInCubic(i, 0, 1, frames)),
|
|
||||||
('text', 'style', 'opacity', 0),
|
|
||||||
)
|
|
||||||
|
|
||||||
# 3 Sekunden Fadein text
|
|
||||||
frames = 3*fps
|
|
||||||
for i in range(0, frames):
|
|
||||||
yield (
|
|
||||||
('logo', 'style', 'opacity', 1),
|
|
||||||
('text', 'style', 'opacity', "%.4f" % easeInCubic(i, 0, 1, frames)),
|
|
||||||
)
|
|
||||||
|
|
||||||
# 3 Sekunden stehen bleiben
|
|
||||||
frames = 3*fps
|
|
||||||
for i in range(0, frames):
|
|
||||||
yield (
|
|
||||||
('logo', 'style', 'opacity', 1),
|
|
||||||
('text', 'style', 'opacity', 1),
|
|
||||||
)
|
|
||||||
|
|
||||||
def pauseFrames(p):
|
|
||||||
# 8 Sekunden im kresi drehen
|
|
||||||
frames = int(8*fps)
|
|
||||||
for i in range(0, frames):
|
|
||||||
yield (
|
|
||||||
('logo', 'attr', 'transform', 'translate(%.4f, %.4f)' % (math.sin(i / frames * math.pi * 2) * 300, math.cos(i / frames * math.pi * 2) * 280) ),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def debug():
|
|
||||||
# render(
|
|
||||||
# 'pause.svg',
|
|
||||||
# '../pause.dv',
|
|
||||||
# pauseFrames
|
|
||||||
# )
|
|
||||||
|
|
||||||
render(
|
|
||||||
'intro.svg',
|
|
||||||
'../intro.ts',
|
|
||||||
introFrames
|
|
||||||
)
|
|
||||||
|
|
||||||
render(
|
|
||||||
'outro.svg',
|
|
||||||
'../outro.ts',
|
|
||||||
outroFrames
|
|
||||||
)
|
|
||||||
|
|
||||||
render(
|
|
||||||
'pause.svg',
|
|
||||||
'../pause.ts',
|
|
||||||
pauseFrames
|
|
||||||
)
|
|
||||||
|
|
||||||
def tasks(queue):
|
|
||||||
# generate a task description and put them into the queue
|
|
||||||
queue.put(Rendertask(
|
|
||||||
infile = 'intro.svg',
|
|
||||||
outfile = "intro.ts",
|
|
||||||
sequence = introFrames
|
|
||||||
))
|
|
||||||
|
|
||||||
# place a task for the outro into the queue
|
|
||||||
queue.put(Rendertask(
|
|
||||||
infile = 'outro.svg',
|
|
||||||
outfile = 'outro.ts',
|
|
||||||
sequence = outroFrames
|
|
||||||
))
|
|
||||||
|
|
||||||
# place a task for the pause into the queue
|
|
||||||
queue.put(Rendertask(
|
|
||||||
infile = 'pause.svg',
|
|
||||||
outfile = 'pause.ts',
|
|
||||||
sequence = outroFrames
|
|
||||||
))
|
|