From acb7b37a5e3f3a9bd48526e97d9ca907cf7c82c6 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Mon, 11 Jun 2018 23:07:19 +0200 Subject: [PATCH] Rename cr to chaosradio, align with datengarten ...and prepare for the day that Chaosradio will have a schedule.xml, too. --- chaosradio/.__init__.py.swp | Bin 0 -> 12288 bytes chaosradio/__init__.py | 114 +++++++++++++++++++++++++++ {cr => chaosradio}/artwork/by-sa.svg | 0 {cr => chaosradio}/artwork/cc0.svg | 0 {cr => chaosradio}/artwork/intro.svg | 4 +- {cr => chaosradio}/artwork/outro.svg | 0 {cr => chaosradio}/artwork/pause.svg | 0 cr/__init__.py | 111 -------------------------- 8 files changed, 116 insertions(+), 113 deletions(-) create mode 100644 chaosradio/.__init__.py.swp create mode 100644 chaosradio/__init__.py rename {cr => chaosradio}/artwork/by-sa.svg (100%) rename {cr => chaosradio}/artwork/cc0.svg (100%) rename {cr => chaosradio}/artwork/intro.svg (99%) rename {cr => chaosradio}/artwork/outro.svg (100%) rename {cr => chaosradio}/artwork/pause.svg (100%) delete mode 100644 cr/__init__.py diff --git a/chaosradio/.__init__.py.swp b/chaosradio/.__init__.py.swp new file mode 100644 index 0000000000000000000000000000000000000000..5de6c9bd8f9418740fa412409087297af91f0e2d GIT binary patch literal 12288 zcmeI2?`s@I7{{k-wO6gyA0SF8)4hh>tCzd{vV=fX&_)AQ#L`j?A?)4G-HqAouCsG# z(o)6x&L6e!^o6eke-!i|Xp4E_8xh1ef^Uj~iXhmxE%Zh4JF~ml>>01c1hG0xKbhUx zXLjfLKF>Up&}|GInSPdz*Mx*Ht&I2jJ!LX}-wpqZ0D??FlcHA%)uE)dr+#C&=Z~$0fJ2-ncAwGBsya>j@9&l|3A-{sN z;2E$VJPPgwSMMU^d$0mdfdgO^jDX#s1h#=+?j+c690k+h02l+;wqbtY3b+g|fgiv(U{PWed!@^QCZm&7e=9R3+yxdF zOwixrzOt~jNlnIfwP3-6qCvdaUSok5bXhIxO6LU@cuYt)o_F+k-l9P$sfEW{lm|4P z=aJ82Iic^CY2>?@nM>6O+6o1g9hOWJ)-u$W`st)FogNn{j*|rg)no6Cn25u`o}g@z z1#-qtt^?)2J-d#*B_;q>PZZv@CLsC~rX(Q6 zSL6|irEt>etG84hu@D`rXq`t#Kd^SA(J9mPyQ$R>cr0!T9!VYs)D1j}m{N{^ePW^1 zXoi90L6;T$R5v1lp^l}(9^v~g%021~#B^pLo~>APfM%{`I%kp6t`_qcsidB@Rtue5 z$SUsTIi=p39skg@hV-G*yLTdK`a4Pg_e{WkBr*s{M1s^hRQ2_5<79T!@RD~4huiEDkC@4XLne#i%d}0_fuQS zmZWf-l6kZxFnP7Av*C1U!5?HxQ7B}-sD;a8My=;iD^~56nXJ+-x(5e6*66l%eF(y1 z7E$WKlg#qyf=?$Wsbx(NkF|6yi5*=vs?-(jxSGbLx>|lPfBarhA*GV8cWFs1mF!xr zzNP}ABe_ZzR7vRS=A=VUVtC2kn-vZFDbDEAEM~rsiMcIFTVGxfbV@MZVO++7H9L}_ zYU)wCde|dl`*p_&bn2y>)q-Ryx+^Kh=t!=5rlK6y>Nwh`EU&V*xP-D^)jGBxwnMv$ zIvLAlls%l`JdE5Xm&>>ssuYWiy1mSqj}=VRxjIyuaFrs$4cg2Zsv_K~x~BP|O>_r} z;PAdyly5s_I!q6-`7X8#>9NuIXRH@Yw%eB9ukd^6p=4_x>BY8fhLa7ALh5FOV)B8oTp(HCW z+b^+!qaIrpA$oI0Wz@f#EvPM-?n^q8t9&0C2~i A5C8xG literal 0 HcmV?d00001 diff --git a/chaosradio/__init__.py b/chaosradio/__init__.py new file mode 100644 index 0000000..684d686 --- /dev/null +++ b/chaosradio/__init__.py @@ -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 + )) + diff --git a/cr/artwork/by-sa.svg b/chaosradio/artwork/by-sa.svg similarity index 100% rename from cr/artwork/by-sa.svg rename to chaosradio/artwork/by-sa.svg diff --git a/cr/artwork/cc0.svg b/chaosradio/artwork/cc0.svg similarity index 100% rename from cr/artwork/cc0.svg rename to chaosradio/artwork/cc0.svg diff --git a/cr/artwork/intro.svg b/chaosradio/artwork/intro.svg similarity index 99% rename from cr/artwork/intro.svg rename to chaosradio/artwork/intro.svg index ccf9481..5aebd7a 100644 --- a/cr/artwork/intro.svg +++ b/chaosradio/artwork/intro.svg @@ -251,11 +251,11 @@ x="959.94507" y="639.08167" 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'">CR217CR$idProfessional Hackers + 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 diff --git a/cr/artwork/outro.svg b/chaosradio/artwork/outro.svg similarity index 100% rename from cr/artwork/outro.svg rename to chaosradio/artwork/outro.svg diff --git a/cr/artwork/pause.svg b/chaosradio/artwork/pause.svg similarity index 100% rename from cr/artwork/pause.svg rename to chaosradio/artwork/pause.svg diff --git a/cr/__init__.py b/cr/__init__.py deleted file mode 100644 index 8a275f7..0000000 --- a/cr/__init__.py +++ /dev/null @@ -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 - ))