Changeset - ad41fdc33a91
[Not reviewed]
default
0 3 0
drewp@bigasterisk.com - 14 years ago 2011-06-15 05:32:23
drewp@bigasterisk.com
asco displays hostname and sends better content-type headers
Ignore-this: a25ba775fa44991c2166740410297eae
3 files changed with 12 insertions and 7 deletions:
0 comments (0 inline, 0 general)
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">
 
<html xmlns="http://www.w3.org/1999/xhtml" 
 
      xmlns:py="http://genshi.edgewall.org/">
 
  <head>
 
    <title>ascoltami</title>
 
    <title>ascoltami on ${host}</title>
 
    <script type="text/javascript" src="static/jquery-1.4.2.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"/>
 
  </head>
 
  <body>
 

	
 
    <h1>ascoltami on ${host}</h1>
 
    <div class="songs"/>
 

	
 
    <div>Song: <span id="currentSong"/></div>
light9/ascoltami/webapp.py
Show inline comments
 
import web, jsonlib
 
import web, jsonlib, socket
 
from twisted.python.util import sibpath
 
from light9.namespaces import L9
 
from light9.showconfig import getSongsFromShow
 
from rdflib import URIRef
 

	
 
from web.contrib.template import render_genshi
 
render = render_genshi([sibpath(__file__, ".")])
 
app = None
 

	
 
def songLocation(graph, songUri):
 
@@ -23,7 +24,7 @@ class root(object):
 
        web.header("Content-type", "application/xhtml+xml")
 
        # todo: use a template; embed the show name and the intro/post
 
        # times into the page
 
        return open(sibpath(__file__, "index.html")).read()
 
        return render.index(host=socket.gethostname())
 

	
 
class timeResource(object):
 
    def GET(self):
 
@@ -35,6 +36,7 @@ class timeResource(object):
 
            song = songUri(graph, URIRef(playingLocation))
 
        else:
 
            song = None
 
        web.header("content-type", "application/json")
 
        return jsonlib.write({
 
            "song" : song,
 
            "started" : player.playStartTime,
 
@@ -56,6 +58,7 @@ class timeResource(object):
 
            player.resume()
 
        if 't' in params:
 
            player.seek(params['t'])
 
        web.header("content-type", "text/plain")
 
        return "ok"
 

	
 
class songs(object):
 
@@ -76,6 +79,7 @@ class songResource(object):
 
        graph = app.graph
 

	
 
        app.player.setSong(songLocation(graph, URIRef(web.data())))
 
        web.header("content-type", "text/plain")
 
        return "ok"
 
    
 
class seekPlayOrPause(object):
show/dance2010/readme
Show inline comments
 
@@ -48,7 +48,7 @@ for 2011:
 
- factor out music dir so it can be different per machine
 
- all settings should be in RDF and live-shared across all apps, maybe with anzo for updates
 
- when curvecalc says 'Slider 1', the X coordinates of the curve get misaligned
 
- asco should say clearly what machine it's running on
 
OK asco should say clearly what machine it's running on
 
- asco should have GUI for picking which sound output you want, and store the setting
 
- vidref should have snapshot button for taking pics of the stage
 
- bring mini tripod or beanbag for the vidref camera
0 comments (0 inline, 0 general)