Mercurial > code > home > repos > light9
changeset 1019:5939fce98fad
notes for next step
Ignore-this: 302635a526c833e818eaff3e566d07e7
author | drewp@bigasterisk.com |
---|---|
date | Mon, 26 May 2014 07:45:06 +0000 |
parents | e28a443bd153 |
children | 903296a98ca6 |
files | bin/effecteval show/dance2014/demo.n3 |
diffstat | 2 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/effecteval Sun May 25 21:30:59 2014 +0000 +++ b/bin/effecteval Mon May 26 07:45:06 2014 +0000 @@ -41,6 +41,22 @@ def messageReceived(self, message): log.info("got message %s" % message) # write a patch back to the graph + +def effectDmxDict(graph, effect): + + +class EffectEval(PrettyErrorHandler, cyclone.web.RequestHandler): + def get(self): + uri = URIRef(self.get_argument('uri')) + # return dmx dict for that effect + self.write(effectDmxDict(self.settings.graph, uri)) + +class SongEffectsEval(PrettyErrorHandler, cyclone.web.RequestHandler): + def get(self): + song = URIRef(self.get_argument('song')) + effects = effectsForSong(self.settings.graph, song) + self.write(maxDict(effectDmxDict(e) for e in effects)) + # return dmx dict for all effects in the song, already combined class App(object): def __init__(self, show): @@ -56,6 +72,8 @@ (r'/effect\.js', StaticCoffee, {'src': 'light9/effecteval/effect.coffee'}), (r'/effectData', EffectData), (r'/static/(.*)', SFH, {'path': 'static/'}), + (r'/effect/eval', EffectEval), + (r'/songEffects/eval', SongEffectsEval), ], debug=True, graph=self.graph) #graph.initiallySynced.addCallback(
--- a/show/dance2014/demo.n3 Sun May 25 21:30:59 2014 +0000 +++ b/show/dance2014/demo.n3 Mon May 26 07:45:06 2014 +0000 @@ -1,6 +1,7 @@ @prefix : <http://light9.bigasterisk.com/> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +# curvedb writes these. point data might be in separate files <http://ex/effect/song1/opening> a :Curve; rdfs:label "opening"; :points "0.0 0 183.695203336 0" .