Changeset - 95dfce5c12ce
[Not reviewed]
default
! ! !
drewp@bigasterisk.com - 10 years ago 2015-06-07 22:42:33
drewp@bigasterisk.com
rearrange /static. new bin/homepage
Ignore-this: 2b17aa8e74a9c052a9a93704e85287b1
51 files changed with 70 insertions and 46 deletions:
0 comments (0 inline, 0 general)
bin/effecteval
Show inline comments
 
@@ -292,49 +292,48 @@ class App(object):
 

	
 
        self.stats = scales.collection('/',
 
                                       scales.PmfStat('sendLevels'),
 
                                       scales.PmfStat('getMusic'),
 
                                       scales.PmfStat('evals'),
 
                                       scales.PmfStat('sendOutput'),
 
                                       scales.IntStat('errors'),
 
                                       )
 

	
 
    def launch(self, *args):
 
        self.loop = makeEffectLoop(self.graph, self.stats, self.outputWhere)
 
        self.loop.startLoop()
 
        
 
        SFH = cyclone.web.StaticFileHandler
 
        self.cycloneApp = cyclone.web.Application(handlers=[
 
            (r'/()', SFH,
 
             {'path': 'light9/effecteval', 'default_filename': 'index.html'}),
 
            (r'/effect', EffectEdit),
 
            (r'/(websocket\.js)', SFH, {'path': 'light9/rdfdb/web/'}),
 
            (r'/effect\.js', StaticCoffee, {'src': 'light9/effecteval/effect.coffee'}),
 
            (r'/index\.js', StaticCoffee, {'src': 'light9/effecteval/index.coffee'}),
 
            (r'/effectUpdates', EffectUpdates),
 
            (r'/code', Code),
 
            (r'/songEffectsUpdates', SongEffectsUpdates),
 
            (r'/static/(.*)', SFH, {'path': 'static/'}),
 
            (r'/effect/eval', EffectEval),
 
            (r'/songEffects', SongEffects),
 
            (r'/songEffects/eval', SongEffectsEval),
 
            (r'/stats', StatsForCyclone),
 
        ],
 
                                                  debug=True,
 
                                                  graph=self.graph,
 
                                                  stats=self.stats)
 
        reactor.listenTCP(networking.effectEval.port, self.cycloneApp)
 
        log.info("listening on %s" % networking.effectEval.port)
 
        
 
class StaticCoffee(PrettyErrorHandler, cyclone.web.RequestHandler):
 
    def initialize(self, src):
 
        super(StaticCoffee, self).initialize()
 
        self.src = src
 
    def get(self):
 
        self.set_header('Content-Type', 'application/javascript')
 
        self.write(subprocess.check_output([
 
            '/usr/bin/coffee', '--compile', '--print', self.src]))
 

	
 
        
 
if __name__ == "__main__":
 
    parser = optparse.OptionParser()
 
    parser.add_option('--show',
bin/homepage
Show inline comments
 
new file 100644
 
#!/bin/zsh
 

	
 
CONF=/tmp/light9_nginx.conf
 
ROOT=`dirname $0`/..
 
ROOT=${ROOT:a}
 

	
 
cat > $CONF <<EOF
 
worker_processes 1;
 

	
 
daemon off;
 
error_log /tmp/light9_homepage.err;
 
pid /dev/null;
 

	
 
events {
 
  worker_connections 1024;
 
}
 

	
 
http {
 
 include $ROOT/light9/web/mime.types;
 
 
 
 server {
 
  listen 8052;
 
  access_log /tmp/light9_homepage_access.log;
 

	
 
  location /rdfdb { proxy_pass http://localhost:8051/; }
 
  location /ascoltami { proxy_pass http://localhost:8040/; rewrite /ascoltami(.*) $1 break; }
 

	
 
  location / {
 
    root $ROOT/light9/web;
 
  }
 

	
 
 }
 
}
 
EOF
 

	
 
exec nginx -c $CONF
bin/picamserve
Show inline comments
 
@@ -144,30 +144,30 @@ class Pics(cyclone.web.RequestHandler):
 
                self.write("%s %s\n" % (len(frame), frameTime))
 
                self.write(frame)
 
                self.flush()
 

	
 
                fpsReport.frame()
 
            # another camera request coming in at the same time breaks
 
            # the server. it would be nice if this request could
 
            # let-go-and-reopen when it knows about another request
 
            # coming in
 
            yield captureContinuousAsync(c, resize, onFrame)
 
        except Exception:
 
            traceback.print_exc()
 
            
 
    def on_connection_close(self, *a, **kw):
 
        log.info("connection closed")
 
        self.running = False
 
            
 
log.setLevel(logging.INFO)
 

	
 
with cameraCls() as camera:
 
    port = 8001
 
    reactor.listenTCP(port, cyclone.web.Application(handlers=[
 
        (r'/pic', Pic),
 
        (r'/pics', Pics),
 
        (r'/static/(.*)', cyclone.web.StaticFileHandler, {'path': 'static/'}),
 
        (r'/static/(.*)', cyclone.web.StaticFileHandler, {'path': 'light9/web/'}),
 
        (r'/(|gui.js)', cyclone.web.StaticFileHandler, {'path': 'light9/vidref/',
 
                                                 'default_filename': 'index.html'}),
 
        ], debug=True, camera=camera))
 
    log.info("serving on %s" % port)
 
    reactor.run()
bin/rdfdb
Show inline comments
 
@@ -407,32 +407,31 @@ class NoExts(cyclone.web.StaticFileHandl
 
if __name__ == "__main__":
 
    logging.basicConfig()
 
    log = logging.getLogger()
 

	
 
    parser = optparse.OptionParser()
 
    parser.add_option("-v", "--verbose", action="store_true",
 
                      help="logging.DEBUG")
 
    (options, args) = parser.parse_args()
 

	
 
    log.setLevel(logging.DEBUG if options.verbose else logging.INFO)
 

	
 
    db = Db(dirUriMap={os.environ['LIGHT9_SHOW'].rstrip('/') + '/':
 
                       URIRef('http://light9.bigasterisk.com/show/dance2014/')})
 

	
 
    from twisted.python import log as twlog
 
    twlog.startLogging(sys.stdout)
 

	
 
    port = 8051
 
    reactor.listenTCP(port, cyclone.web.Application(handlers=[
 
        (r'/live', Live),
 
        (r'/graph', GraphResource),
 
        (r'/patches', Patches),
 
        (r'/graphClients', GraphClients),
 

	
 
        (r'/static/(.*)', cyclone.web.StaticFileHandler, {'path': 'static/'}),
 
        (r'/(.*)', NoExts,
 
         {"path" : "light9/rdfdb/web",
 
          "default_filename" : "index.xhtml"}),
 

	
 
        ], debug=True, db=db))
 
    log.info("serving on %s" % port)
 
    prof.run(reactor.run, profile=None)
bin/subserver
Show inline comments
 
@@ -130,31 +130,30 @@ if __name__ == "__main__":
 
        
 
        d.clear()
 
        d.update({'subs': subs})
 

	
 
        d['chases'] = []
 
        for chase in sorted(graph.subjects(RDF.type, L9['Chase'])):
 
            fakeLabel = chase.rsplit('/', 1)[-1]
 
            d['chases'].append({
 
                'uri': chase,
 
                'label': fakeLabel,
 
            })
 
        
 
        sendToLiveClients(d=d)
 
    def onNewClient():
 
        sendToLiveClients(d=d)
 
        
 
    graph.addHandler(updateSubs)
 
    
 
    
 
    port = 8052
 
    reactor.listenTCP(port, cyclone.web.Application(handlers=[
 
        (r'/live', Live),
 
        (r'/effectsUpdates', EffectsUpdates),
 
        (r'/snapshot', Snapshot),
 
        (r'/static/(.*)', cyclone.web.StaticFileHandler, {'path': 'static/'}),
 
        (r'/(.*)', Static,
 
         {"path" : "light9/subserver",
 
          "default_filename" : "index.jade"}),
 
        ], debug=True, graph=graph, onNewClient=onNewClient))
 
    log.info("serving on %s" % port)
 
    reactor.run()
bin/vidref
Show inline comments
 
@@ -37,32 +37,31 @@ class Snapshot(cyclone.web.RequestHandle
 

	
 
            assert outputFilename.startswith(snapshotDir())
 
            out = networking.vidref.path(
 
                "snapshot/%s" % outputFilename[len(snapshotDir()):].lstrip('/'))
 
            
 
            self.write(json.dumps({'snapshot': out}))
 
            self.set_header("Location", out)
 
            self.set_status(303)
 
        except Exception as e:
 
            import traceback
 
            traceback.print_exc()
 
            raise
 

	
 
class SnapshotPic(cyclone.web.StaticFileHandler):
 
    pass
 

	
 
graph = SyncedGraph(networking.rdfdb.url, "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))
 
log.info("serving on %s" % port)
 

	
 
reactor.run()
 

	
bin/vidrefsetup
Show inline comments
 
@@ -40,31 +40,30 @@ class VidrefCamRequest(PrettyErrorHandle
 
        graph = self.settings.graph
 
        show = showconfig.showUri()
 
        graph.patchObject(context=URIRef(show + '/vidrefConfig'),
 
                          subject=show,
 
                          predicate=L9['vidrefCamRequest'],
 
                          newObject=URIRef(self.get_argument('uri')))
 
        self.send_error(202)
 

	
 
def main():
 
    parser = optparse.OptionParser()
 
    parser.add_option("-v", "--verbose", action="store_true",
 
                      help="logging.DEBUG")
 
    (options, args) = parser.parse_args()
 

	
 
    log.setLevel(logging.DEBUG if options.verbose else logging.INFO)
 
    graph = SyncedGraph(networking.rdfdb.url, "vidrefsetup")
 

	
 
    # deliberately conflict with vidref since they can't talk at once to cam
 
    port = networking.vidref.port 
 

	
 
    reactor.listenTCP(port, cyclone.web.Application(handlers=[
 
        (r'/pic', RedirToCamera),
 
        (r'/picUrl', UrlToCamera),
 
        (r'/vidrefCamRequest', VidrefCamRequest),
 
        (r'/static/(.*)', cyclone.web.StaticFileHandler, {'path': 'static/'}),
 
        (r'/()', cyclone.web.StaticFileHandler, {'path': 'light9/vidref/', 'default_filename': 'vidref.html'}),
 
        ], debug=True, graph=graph))
 
    log.info("serving on %s" % port)
 
    reactor.run()
 

	
 
main()
light9/ascoltami/index.html
Show inline comments
 
<?xml version="1.0" encoding="iso-8859-1"?>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
 
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" 
 
      xmlns:py="http://genshi.edgewall.org/">
 
  <head>
 
    <title>ascoltami on ${host}</title>
 
    <script type="text/javascript" src="static/jquery-2.1.1.min.js"></script>
 
      <script type="text/javascript" src="static/jquery-ui-1.8.2.custom/js/jquery-ui-1.8.2.custom.min.js"></script>
 
      <link rel="Stylesheet" type="text/css" href="static/jquery-ui-1.8.2.custom/css/smoothness/jquery-ui-1.8.2.custom.css"/>
 
      <link rel="Stylesheet" type="text/css" href="static/style.css"/>
 
    <script type="text/javascript" src="/lib/jquery-2.1.1.min.js"></script>
 
    <script type="text/javascript" src="/lib/jquery-ui-1.8.2.custom/js/jquery-ui-1.8.2.custom.min.js"></script>
 
    <link rel="Stylesheet" type="text/css" href="/lib/jquery-ui-1.8.2.custom/css/smoothness/jquery-ui-1.8.2.custom.css"/>
 
    <link rel="Stylesheet" type="text/css" href="/style.css"/>
 
  </head>
 
  <body>
 
    <h1>ascoltami on ${host}</h1>
 
    <div class="songs"/>
 

	
 
    <div class="dimStalled">
 
      <table>
 
        <tr><td colspan="3">Song: <span id="currentSong"/></td></tr>
 
        <tr>
 
          <td>Time: <span id="currentTime"/></td>
 
          <td>Left: <span id="leftTime"/></td>
 
          <td>Until autostop: <span id="leftAutoStopTime"/></td>
 
        </tr>
 
        <tr>
 

	
 
          <td colspan="3">
 
            Update freq: requested <span id="updateReq"/>, actual <span id="updateActual"/>
 
            States: <span id="states"/>
 
          </td>
 
          
 
        </tr>
 
      </table>
 
      
 
      <div class="timeRow">
light9/ascoltami/webapp.py
Show inline comments
 
@@ -96,42 +96,35 @@ class seekPlayOrPause(PrettyErrorHandler
 
        else:
 
            player.seek(data['t'])
 
            player.resume()
 

	
 
class output(PrettyErrorHandler, cyclone.web.RequestHandler):
 
    def post(self):
 
        d = json.loads(self.request.body)
 
        subprocess.check_call(["bin/movesinks", str(d['sink'])])
 

	
 
class goButton(PrettyErrorHandler, cyclone.web.RequestHandler):
 
    def post(self):
 
        """
 
        if music is playing, this silently does nothing.
 
        """
 
        graph, player = self.settings.app.graph, self.settings.app.player
 

	
 
        if player.isPlaying():
 
            pass
 
        else:
 
            player.resume()
 
            
 
        self.set_header("Content-Type", "text/plain")
 
        self.write("ok")
 

	
 
class static(PrettyErrorHandler, cyclone.web.RequestHandler):
 
    def get(self, name):
 
        if name.endswith('.css'):
 
            self.set_header("Content-Type", "text/css")
 
        self.write(FilePath("static").preauthChild(name).open().read())
 

	
 
def makeWebApp(app):
 
    return cyclone.web.Application(handlers=[
 
        (r"/", root),
 
        (r"/time", timeResource),
 
        (r"/song", songResource),
 
        (r"/songs", songs),
 
        (r"/seekPlayOrPause", seekPlayOrPause),
 
        (r"/output", output),
 
        (r"/go", goButton),
 
        (r"/static/(.*)", static),
 
        ], app=app)
 

	
light9/effecteval/effect.html
Show inline comments
 
<!doctype html>
 
<html>
 
  <head>
 
    <title>effect</title>
 
    <meta charset="utf-8" />
 
    <link rel="stylesheet" href="static/style.css">
 
    <link rel="stylesheet" href="/style.css">
 

	
 
  </head>
 
  <body>
 
    <a href="./">Effects</a> / <a class="effect" data-bind="attr: {href: toSave.uri}, text: toSave.uri"></a>
 

	
 
    <div data-bind="foreach: toSave.codeLines">
 
      <div>
 
        code:
 
        <input type="text" size="160" data-bind="value: text"></input>
 
      </div>
 
    </div>
 
    
 
    <script src="static/jquery-2.1.1.min.js"></script>
 
    <script src="static/knockout-3.1.0.js"></script>
 
    <script src="static/websocket.js"></script>
 
    <script src="static/QueryString.js"></script>
 
    <script src="/lib/jquery-2.1.1.min.js"></script>
 
    <script src="/lib/knockout-3.1.0.js"></script>
 
    <script src="/websocket.js"></script>
 
    <script src="/lib/QueryString.js"></script>
 
    <script src="effect.js"></script>
 
  </body>
 
</html>
light9/effecteval/index.html
Show inline comments
 
<!doctype html>
 
<html>
 
  <head>
 
    <title>effecteval</title>
 
    <meta charset="utf-8" />
 
    <link rel="stylesheet" href="static/style.css">
 
    <link rel="stylesheet" href="/style.css">
 
  </head>
 
  <body>
 
    <div><a href="stats">/stats</a></div>
 
    <h1>Effect instances</h1>
 
    <div><a href=".">View all songs</a></div>
 
    <!-- subscribe to a query of all effects and their songs -->
 
    <ul data-bind="foreach: songs">
 
      <li>
 
        <a class="song" data-bind="attr: {href: uri}, click: $root.focusSong">Song <span data-bind="text: label"></span></a>
 
        <ul>
 
          <!-- ko foreach: effects -->
 
          <li>
 
            <a class="effect" data-bind="attr: {href: 'effect?'+jQuery.param({uri: uri})}, text: label"></a> <button data-bind="click: deleteEffect">Delete</button>
 
          </li>
 
          <!-- /ko -->
 
          <li class="dropTarget" data-bind="event: {dragover: $root.dragover, dragenter: $root.dragover, drop: function(data, event) { $root.drop(uri, event); }}">Add another (drop a sub or effect class)</li>
 
        </ul>
 
      </li>
 
    </ul>
 
    <script src="static/jquery-2.1.1.min.js"></script>
 
    <script src="static/knockout-3.1.0.js"></script>
 
    <script src="static/websocket.js"></script>
 
    <script src="/lib/jquery-2.1.1.min.js"></script>
 
    <script src="/lib/knockout-3.1.0.js"></script>
 
    <script src="/websocket.js"></script>
 
    <script src="index.js"></script>
 
  </body>
 
</html>
light9/rdfdb/web/graphView.xhtml
Show inline comments
 
<?xml version="1.0" encoding="utf-8"?>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
 
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
    <title>graphview</title>
 
    <link rel="stylesheet" type="text/css" href="style.css"/>
 
    <link rel="stylesheet" type="text/css" href="/style.css"/>
 

	
 
  </head>
 
  <body>
 
    <!--
 
        this page is another graph client who maintains the whole
 
        graph all the time
 
    -->
 

	
 
    <p>status: <span id="status">starting...</span></p>
 

	
 
    <fieldset>
 
      <legend>Messages</legend>
 
      <div id="out"></div>
 
    </fieldset>
 

	
 
    <p>URI substring: <input type="text" id="uriSubstring"/></p>
 

	
 
    <table>
 
      <thead>
 
        <tr>
 
          <th>subject</th> <th>predicate</th> <th>object</th> <th>context</th>
 
        </tr>
 
      </thead>
 
      <tbody>
 
      </tbody>
 
    </table>
 

	
 
    <script type="text/javascript" src="static/jquery-2.1.1.min.js"></script>
 
    <script type="text/javascript" src="static/websocket.js"></script>
 
    <script type="text/javascript" src="/lib/jquery-2.1.1.min.js"></script>
 
    <script type="text/javascript" src="/websocket.js"></script>
 
    <script type="text/javascript" src="syncedgraph.js"></script>
 
    <script type="text/javascript">
 
      // <![CDATA[
 
      $(function(){
 

	
 
      });
 
      // ]]>
 
    </script>
 
  </body>
 
</html>
light9/rdfdb/web/index.xhtml
Show inline comments
 
<?xml version="1.0" encoding="utf8"?>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
 
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
    <title>rdfdb</title>
 
    <link rel="stylesheet" type="text/css" href="style.css"/>
 
    <link rel="stylesheet" type="text/css" href="/style.css"/>
 
  </head>
 
  <body>
 
    <h1>rdfdb</h1>
 
    <p>status: <span id="status">starting...</span></p>
 
    
 
    <section>
 
      <h2>Edits</h2>
 
      <div id="patches"></div>
 
    </section>
 

	
 
    <p>Clients: <span id="clients"/></p>
 

	
 
    <fieldset>
 
      <legend>Messages</legend>
 
      <div id="out"></div>
 
    </fieldset>
 

	
 
    <script type="text/javascript" src="static/jquery-2.1.1.min.js"></script>
 
    <script type="text/javascript" src="static/websocket.js"></script>
 
    <script type="text/javascript" src="/lib/jquery-2.1.1.min.js"></script>
 
    <script type="text/javascript" src="/websocket.js"></script>
 
    <script type="text/javascript">
 
      // <![CDATA[
 
      $(function(){
 

	
 
          function collapseCuries(s) {
 
            // this is temporary. The correct thing is to parse the quad (or receive it as a tree) and then make links to the full URIs and display curies of them
 

	
 
              return s
 
                  .replace(/<http:\/\/www.w3.org\/2001\/XMLSchema#(.*?)>/g, function (match, short) { return "xsd:"+short; })
 
                  .replace(/<http:\/\/light9.bigasterisk.com\/(.*?)>/g, function (match, short) { return "light9:"+short; })
 
                  .replace(/<http:\/\/light9.bigasterisk.com\/show\/dance2012\/sessions\/(.*?)>/g, function (match, short) { return "kcsession:"+short });
 
          }
 

	
 
          function onMessage(d) {
 
              if (d.clients !== undefined) {
 
                  $("#clients").empty().text(JSON.stringify(d.clients));
 
              }
 
              if (d.patch !== undefined) {
 
                  $("#patches").prepend(
 
                      $("<fieldset>").addClass("patch")
 
                          .append($("<legend>").text("Patch"))
 
                          .append($("<div>").addClass("deletes").text(collapseCuries(d.patch.deletes)))
 
                          .append($("<div>").addClass("adds").text(collapseCuries(d.patch.adds)))
 
                  );
light9/subserver/effects.jade
Show inline comments
 
doctype html
 
html
 
  head
 
    title effects
 
    link(rel='stylesheet', href='style.css')
 
    link(rel='stylesheet', href='/style.css')
 
  body
 
    h1 Effects
 

	
 
    div(data-bind="foreach: moreExprs")
 
      div.resource.chase
 
        span(data-bind="text: label")
 
        | 
 
        a.resource(data-bind="attr: {href: $root.subtermLink(label, expr)}, text: expr")
 
    
 
    div(data-bind="foreach: chases")
 
      div.resource.chase
 
        | Chase
 
        a(data-bind="attr: {href: uri}, text: label")
 
        ul(data-bind="foreach: $parent.subtermExprs($data)")
 
          li: a.resource(data-bind="attr: {href: $root.subtermLink($parent.label, $data)}, text: $data")
 

	
 

	
 
    div(data-bind="foreach: classes")
 
      div.resource.effectClass
 
        h2
 
          | Effect class
 
          | 
 
          a(data-bind="attr: {href: uri}, text: label")
 
          button(data-bind="click: $root.addToCurrentSong") Add to current song
 
        div
 
          code(data-bind="text: code")
 
        
 
    #status
 
      
 
    script(src="static/jquery-2.1.1.min.js")
 
    script(src="static/knockout-3.1.0.js")
 
    script(src="static/websocket.js")
 
    script(src="/lib/jquery-2.1.1.min.js")
 
    script(src="/lib/knockout-3.1.0.js")
 
    script(src="/websocket.js")
 
    script(src="effects.js")
 
\ No newline at end of file
light9/subserver/index.jade
Show inline comments
 
doctype html
 
html
 
  head
 
    title subs
 
    link(rel='stylesheet', href='style.css')
 
    link(rel='stylesheet', href='/style.css')
 
  body
 
    h1 Submasters
 

	
 
    div
 
      input(type='checkbox', data-bind='checked: showLocal', id='showLocal')
 
      label(for='showLocal') show local
 
    
 
    div(data-bind="foreach: subs")
 
      // ko if: $parent.showLocal() || !isLocal
 
      a.resource.sub(data-bind="css: {local: isLocal}, attr: {href: uri}")
 
        div(data-bind="if: isLocal") (local)
 
        div
 
          | Label
 
          input(type="text", data-bind="value: label")
 
        div
 
          img(data-bind="attr: {src: img}")
 
        div
 
          button(data-bind="click: $root.snapshot")
 
            New snapshot
 
            
 
      // /ko
 

	
 
    #status
 
      
 
    script(src="static/jquery-2.1.1.min.js")
 
    script(src="static/knockout-3.1.0.js")
 
    script(src="static/websocket.js")
 
    script(src="/lib/jquery-2.1.1.min.js")
 
    script(src="/lib/knockout-3.1.0.js")
 
    script(src="/websocket.js")
 
    script(src="gui.js")
 
\ No newline at end of file
light9/vidref/index.html
Show inline comments
 
@@ -10,28 +10,28 @@
 
       margin: 3px;
 
       padding: 2px;
 
       }
 
     .tile img {
 
       }
 
     
 
    </style>
 
  </head>
 
  <body>
 
    <section>
 
      Whole view
 
      <div class="tile">
 
        <img src="pic?resize=500&awb_mode=auto&exposure_mode=auto&shutter=100000">
 
      </div>
 
    </section>
 
  <section>
 
    Shutters
 
      <div data-bind="foreach: shutters">
 
        <div class="tile">
 
          <div><img data-bind="attr: {src: 'pic?res=480&resize=200&x=.5&y=.3&w=.5&h=.2&awb_mode=auto&exposure_mode=auto&shutter='+$data}"></div>
 
          <span data-bind="text: ($data / 1000) + ' ms'"></span> 
 
        </div>
 
      </div>
 
    </section>
 
    <script src="static/knockout-3.1.0.js"></script>
 
    <script src="/lib/knockout-3.1.0.js"></script>
 
    <script src="gui.js"></script>
 
  </body>
 
</html>
light9/vidref/vidref.html
Show inline comments
 
<!doctype html>
 
<html>
 
  <head>
 
    <title>vidref</title>
 
    <meta charset="utf-8" />
 
    <link rel="stylesheet" href="static/tapmodo-Jcrop-1902fbc/css/jquery.Jcrop.min.css" type="text/css">
 
    <link rel="stylesheet" href="/lib/tapmodo-Jcrop-1902fbc/css/jquery.Jcrop.min.css" type="text/css">
 
    <style>
 
     body {
 
       background: black;
 
       color: rgb(170, 170, 170);
 
       font-family: sans-serif; 
 
     }
 
     a {
 
       color: rgb(163, 163, 255);
 
     }
 
     input[type=range] { width: 400px; }
 
     .smallUrl { font-size: 60%; }
 

	
 
     .jcrop-holder {
 
       position: absolute !important;
 
       top: 0 !important;
 
       background-color: initial !important;
 
     }
 
    </style>
 
  </head>
 
  <body>
 
    <h1>video setup</h1>
 
    
 
    <div>Camera view</div>
 
    <div>
 
@@ -77,52 +77,52 @@
 
        <option>200</option>
 
        <option>320</option>
 
        <option>400</option>
 
        <option>500</option>
 
        <option>640</option>
 
        <option>800</option>
 
      </datalist>
 
      <div><label>rotation
 
        <select data-bind="value: params.rotation">
 
          <option>0</option>
 
          <option>90</option>
 
          <option>180</option>
 
          <option>270</option>
 
        </select>
 
      </label></div>
 
      <div>See <a href="http://picamera.readthedocs.org/en/release-1.4/api.html#picamera.PiCamera.ISO">picamera attribute docs</a></div>
 
    </fieldset>
 

	
 
    <div>Resulting url: <a class="smallUrl" data-bind="attr: {href: currentUrl}, text: currentUrl"></a></div>
 

	
 
    <div>Resulting crop image:</div>
 
    <div><img id="cropped"></div>
 

	
 
    
 
    <script src="static/knockout-3.1.0.js"></script>
 
    <script src="static/jquery-2.1.1.min.js"></script>
 
    <script src="static/underscore-min.js"></script>
 
    <script src="static/tapmodo-Jcrop-1902fbc/js/jquery.Jcrop.js"></script>
 
    <script src="/lib/knockout-3.1.0.js"></script>
 
    <script src="/lib/jquery-2.1.1.min.js"></script>
 
    <script src="/lib/underscore-min.js"></script>
 
    <script src="/lib/tapmodo-Jcrop-1902fbc/js/jquery.Jcrop.js"></script>
 
    <script>
 
     jQuery(function () {
 
       var model = {
 
         baseUrl: ko.observable(),
 
         crop: ko.observable({x: 0, y: 0, w: 1, h: 1}),
 
         params: {
 
           shutter: ko.observable(50000),
 
           exposure_mode: ko.observable('auto'),
 
           awb_mode: ko.observable('auto'),
 
           brightness: ko.observable(50),
 
           redgain: ko.observable(1),
 
           bluegain: ko.observable(1),
 
           iso: ko.observable(250),
 
           exposure_compensation: ko.observable(0),
 
           rotation: ko.observable(0),
 
         }
 
       };
 
       model.currentUrl = ko.computed(assembleCamUrlWithCrop);
 

	
 
       function getBaseUrl() {
 
         $.ajax({
 
           url: 'picUrl',
 
           success: model.baseUrl
 
         });
light9/web/lib/QueryString.js
Show inline comments
 
file renamed from static/QueryString.js to light9/web/lib/QueryString.js
light9/web/lib/jquery-1.7.2.min.js
Show inline comments
 
file renamed from light9/rdfdb/web/lib/jquery-1.7.2.min.js to light9/web/lib/jquery-1.7.2.min.js
light9/web/lib/jquery-2.1.1.min.js
Show inline comments
 
file renamed from static/jquery-2.1.1.min.js to light9/web/lib/jquery-2.1.1.min.js
light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-anim_basic_16x16.gif
Show inline comments
 
file renamed from static/jquery-ui-1.8.2.custom/css/smoothness/images/ui-anim_basic_16x16.gif to light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-anim_basic_16x16.gif
Show images
light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
Show inline comments
 
file renamed from static/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png to light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
Show images
light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
Show inline comments
 
file renamed from static/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png to light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
Show images
light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
Show inline comments
 
file renamed from static/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png to light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
Show images
light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
Show inline comments
 
file renamed from static/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png to light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
Show images
light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png
Show inline comments
 
file renamed from static/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png to light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png
Show images
light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
Show inline comments
 
file renamed from static/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png to light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
Show images
light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
Show inline comments
 
file renamed from static/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png to light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
Show images
light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
Show inline comments
 
file renamed from static/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png to light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
Show images
light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-icons_222222_256x240.png
Show inline comments
 
file renamed from static/jquery-ui-1.8.2.custom/css/smoothness/images/ui-icons_222222_256x240.png to light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-icons_222222_256x240.png
Show images
light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-icons_2e83ff_256x240.png
Show inline comments
 
file renamed from static/jquery-ui-1.8.2.custom/css/smoothness/images/ui-icons_2e83ff_256x240.png to light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-icons_2e83ff_256x240.png
Show images
light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-icons_454545_256x240.png
Show inline comments
 
file renamed from static/jquery-ui-1.8.2.custom/css/smoothness/images/ui-icons_454545_256x240.png to light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-icons_454545_256x240.png
Show images
light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-icons_888888_256x240.png
Show inline comments
 
file renamed from static/jquery-ui-1.8.2.custom/css/smoothness/images/ui-icons_888888_256x240.png to light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-icons_888888_256x240.png
Show images
light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-icons_cd0a0a_256x240.png
Show inline comments
 
file renamed from static/jquery-ui-1.8.2.custom/css/smoothness/images/ui-icons_cd0a0a_256x240.png to light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/images/ui-icons_cd0a0a_256x240.png
Show images
light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/jquery-ui-1.8.2.custom.css
Show inline comments
 
file renamed from static/jquery-ui-1.8.2.custom/css/smoothness/jquery-ui-1.8.2.custom.css to light9/web/lib/jquery-ui-1.8.2.custom/css/smoothness/jquery-ui-1.8.2.custom.css
light9/web/lib/jquery-ui-1.8.2.custom/js/jquery-ui-1.8.2.custom.min.js
Show inline comments
 
file renamed from static/jquery-ui-1.8.2.custom/js/jquery-ui-1.8.2.custom.min.js to light9/web/lib/jquery-ui-1.8.2.custom/js/jquery-ui-1.8.2.custom.min.js
light9/web/lib/knockout-3.1.0.js
Show inline comments
 
file renamed from static/knockout-3.1.0.js to light9/web/lib/knockout-3.1.0.js
light9/web/lib/knockout.mapping-2.4.1.js
Show inline comments
 
file renamed from static/knockout.mapping-2.4.1.js to light9/web/lib/knockout.mapping-2.4.1.js
light9/web/lib/tapmodo-Jcrop-1902fbc/MIT-LICENSE.txt
Show inline comments
 
file renamed from static/tapmodo-Jcrop-1902fbc/MIT-LICENSE.txt to light9/web/lib/tapmodo-Jcrop-1902fbc/MIT-LICENSE.txt
light9/web/lib/tapmodo-Jcrop-1902fbc/README.md
Show inline comments
 
file renamed from static/tapmodo-Jcrop-1902fbc/README.md to light9/web/lib/tapmodo-Jcrop-1902fbc/README.md
light9/web/lib/tapmodo-Jcrop-1902fbc/css/Jcrop.gif
Show inline comments
 
file renamed from static/tapmodo-Jcrop-1902fbc/css/Jcrop.gif to light9/web/lib/tapmodo-Jcrop-1902fbc/css/Jcrop.gif
Show images
light9/web/lib/tapmodo-Jcrop-1902fbc/css/jquery.Jcrop.css
Show inline comments
 
file renamed from static/tapmodo-Jcrop-1902fbc/css/jquery.Jcrop.css to light9/web/lib/tapmodo-Jcrop-1902fbc/css/jquery.Jcrop.css
light9/web/lib/tapmodo-Jcrop-1902fbc/css/jquery.Jcrop.min.css
Show inline comments
 
file renamed from static/tapmodo-Jcrop-1902fbc/css/jquery.Jcrop.min.css to light9/web/lib/tapmodo-Jcrop-1902fbc/css/jquery.Jcrop.min.css
light9/web/lib/tapmodo-Jcrop-1902fbc/index.html
Show inline comments
 
file renamed from static/tapmodo-Jcrop-1902fbc/index.html to light9/web/lib/tapmodo-Jcrop-1902fbc/index.html
light9/web/lib/tapmodo-Jcrop-1902fbc/js/jquery.Jcrop.js
Show inline comments
 
file renamed from static/tapmodo-Jcrop-1902fbc/js/jquery.Jcrop.js to light9/web/lib/tapmodo-Jcrop-1902fbc/js/jquery.Jcrop.js
light9/web/lib/tapmodo-Jcrop-1902fbc/js/jquery.Jcrop.min.js
Show inline comments
 
file renamed from static/tapmodo-Jcrop-1902fbc/js/jquery.Jcrop.min.js to light9/web/lib/tapmodo-Jcrop-1902fbc/js/jquery.Jcrop.min.js
light9/web/lib/tapmodo-Jcrop-1902fbc/js/jquery.color.js
Show inline comments
 
file renamed from static/tapmodo-Jcrop-1902fbc/js/jquery.color.js to light9/web/lib/tapmodo-Jcrop-1902fbc/js/jquery.color.js
light9/web/lib/tapmodo-Jcrop-1902fbc/js/jquery.min.js
Show inline comments
 
file renamed from static/tapmodo-Jcrop-1902fbc/js/jquery.min.js to light9/web/lib/tapmodo-Jcrop-1902fbc/js/jquery.min.js
light9/web/lib/underscore-min.js
Show inline comments
 
file renamed from static/underscore-min.js to light9/web/lib/underscore-min.js
light9/web/style.css
Show inline comments
 
file renamed from static/style.css to light9/web/style.css
light9/web/websocket.js
Show inline comments
 
file renamed from static/websocket.js to light9/web/websocket.js
0 comments (0 inline, 0 general)