# HG changeset patch
# User drewp@bigasterisk.com
# Date 2014-05-26 07:45:06
# Node ID 5939fce98fad87f0bea963e979e23140cee5a980
# Parent e28a443bd153d61cb66d4b035587ce8d9428d3b6
notes for next step
Ignore-this: 302635a526c833e818eaff3e566d07e7
diff --git a/bin/effecteval b/bin/effecteval
--- a/bin/effecteval
+++ b/bin/effecteval
@@ -41,6 +41,22 @@ class EffectData(cyclone.websocket.WebSo
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 @@ class App(object):
(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(
diff --git a/show/dance2014/demo.n3 b/show/dance2014/demo.n3
--- a/show/dance2014/demo.n3
+++ b/show/dance2014/demo.n3
@@ -1,6 +1,7 @@
@prefix : .
@prefix rdfs: .
+# curvedb writes these. point data might be in separate files
a :Curve;
rdfs:label "opening";
:points "0.0 0 183.695203336 0" .