diff bin/vidref @ 1096:087f6cbe4b22

vidrefsetup tool now prepares a url that vidref will use for rpi camera requests Ignore-this: 3b10bb845aa51811f21f63d4a280d2bd
author Drew Perttula <drewp@bigasterisk.com>
date Sun, 08 Jun 2014 09:30:03 +0000
parents 2ee97997ee56
children a38955ba6f40
line wrap: on
line diff
--- a/bin/vidref	Sun Jun 08 09:29:45 2014 +0000
+++ b/bin/vidref	Sun Jun 08 09:30:03 2014 +0000
@@ -9,11 +9,11 @@
 gobject.threads_init()
 import gtk
 import sys, logging, optparse, json
-sys.path.append(".")
-from light9 import networking
+import cyclone.web, cyclone.httpclient, cyclone.websocket
+from light9 import networking, showconfig
 from light9.vidref.main import Gui
 from light9.vidref.replay import snapshotDir
-import cyclone.web, cyclone.httpclient, cyclone.websocket
+from light9.rdfdb.syncedgraph import SyncedGraph
 
  # find replay dirs correctly. show multiple
  # replays. trash. reorder/pin. dump takes that are too short; they're
@@ -50,11 +50,15 @@
 class SnapshotPic(cyclone.web.StaticFileHandler):
     pass
 
-        
-gui = Gui()
+graph = SyncedGraph("vidref")
+
+gui = Gui(graph)
 
 port = networking.vidref.port
 reactor.listenTCP(port, cyclone.web.Application(handlers=[
+    (r'/()', cyclone.web.StaticFileHandler,
+     {'path': 'light9/vidref', 'default_filename': 'vidref.html'}),
+    (r'/static/(.*)', cyclone.web.StaticFileHandler, {'path': 'static/'}),
     (r'/snapshot', Snapshot),
     (r'/snapshot/(.*)', SnapshotPic, {"path": snapshotDir()}),
     ], debug=True, gui=gui))