# HG changeset patch
# User drewp@bigasterisk.com
# Date 1308115943 0
# Node ID ad41fdc33a91419425406bfb055a0f7791a2e600
# Parent 9071cd1bb29cdb7c78650bac5a0a29d83baec03c
asco displays hostname and sends better content-type headers
Ignore-this: a25ba775fa44991c2166740410297eae
diff -r 9071cd1bb29c -r ad41fdc33a91 light9/ascoltami/index.html
--- a/light9/ascoltami/index.html Wed Jun 15 05:31:33 2011 +0000
+++ b/light9/ascoltami/index.html Wed Jun 15 05:32:23 2011 +0000
@@ -1,16 +1,17 @@
-
+
- ascoltami
+ ascoltami on ${host}
-
+
ascoltami on ${host}
Song:
diff -r 9071cd1bb29c -r ad41fdc33a91 light9/ascoltami/webapp.py
--- a/light9/ascoltami/webapp.py Wed Jun 15 05:31:33 2011 +0000
+++ b/light9/ascoltami/webapp.py Wed Jun 15 05:32:23 2011 +0000
@@ -1,9 +1,10 @@
-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 @@
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 @@
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 @@
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 @@
graph = app.graph
app.player.setSong(songLocation(graph, URIRef(web.data())))
+ web.header("content-type", "text/plain")
return "ok"
class seekPlayOrPause(object):
diff -r 9071cd1bb29c -r ad41fdc33a91 show/dance2010/readme
--- a/show/dance2010/readme Wed Jun 15 05:31:33 2011 +0000
+++ b/show/dance2010/readme Wed Jun 15 05:32:23 2011 +0000
@@ -48,7 +48,7 @@
- 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