Mercurial > code > home > repos > light9
comparison bin/curvecalc @ 590:0cf00fffd921
logging
Ignore-this: a30c74ea5c5d2e0ca9ecb8ced1f7ef47
author | drewp@bigasterisk.com |
---|---|
date | Sun, 20 Jun 2010 05:04:09 +0000 |
parents | ad5043f70fda |
children | b50e4d43dd3e |
comparison
equal
deleted
inserted
replaced
589:a87004506a45 | 590:0cf00fffd921 |
---|---|
28 from rdflib import Literal, URIRef, RDF, RDFS | 28 from rdflib import Literal, URIRef, RDF, RDFS |
29 from rdflib.Graph import Graph | 29 from rdflib.Graph import Graph |
30 import rdflib | 30 import rdflib |
31 import logging | 31 import logging |
32 log = logging.getLogger() | 32 log = logging.getLogger() |
33 logging.basicConfig(format="%(asctime)s %(levelname)-5s %(name)s %(filename)s:%(lineno)d: %(message)s") | |
34 log.setLevel(logging.DEBUG) | |
35 | 33 |
36 import run_local | 34 import run_local |
37 from light9 import Submaster, dmxclient, networking, showconfig, prof, Patch | 35 from light9 import Submaster, dmxclient, networking, showconfig, prof, Patch |
38 from light9.TLUtility import make_attributes_from_args | 36 from light9.TLUtility import make_attributes_from_args |
39 from light9.zoomcontrol import Zoomcontrol | 37 from light9.zoomcontrol import Zoomcontrol |
394 graph.add((uri, L9['expression'], Literal(subterm.subexpr.expr))) | 392 graph.add((uri, L9['expression'], Literal(subterm.subexpr.expr))) |
395 return graph | 393 return graph |
396 | 394 |
397 def add_subterms_for_song(graph, song, curveset, subterms, master): | 395 def add_subterms_for_song(graph, song, curveset, subterms, master): |
398 for st in graph.objects(song, L9['subterm']): | 396 for st in graph.objects(song, L9['subterm']): |
397 log.info("song %s has subterm %s", song, st) | |
399 try: | 398 try: |
400 add_one_subterm(graph, graph.value(st, L9['sub']), curveset, | 399 add_one_subterm(graph, graph.value(st, L9['sub']), curveset, |
401 subterms, master, graph.value(st, L9['expression'])) | 400 subterms, master, graph.value(st, L9['expression'])) |
402 except rdflib.exceptions.UniquenessError: | 401 except rdflib.exceptions.UniquenessError: |
403 print "working around curvecalc save corruption" | 402 print "working around curvecalc save corruption" |
466 parser.add_option("--sliders", action='store_true', | 465 parser.add_option("--sliders", action='store_true', |
467 help='use hardware sliders') | 466 help='use hardware sliders') |
468 parser.add_option("--skip-music", action='store_true', | 467 parser.add_option("--skip-music", action='store_true', |
469 help="ignore music and smooth_music curve files") | 468 help="ignore music and smooth_music curve files") |
470 opts, args = parser.parse_args() | 469 opts, args = parser.parse_args() |
470 | |
471 logging.basicConfig(format="%(asctime)s %(levelname)-5s %(name)s %(filename)s:%(lineno)d: %(message)s") | |
472 log.setLevel(logging.INFO) | |
473 | |
471 | 474 |
472 try: | 475 try: |
473 song = URIRef(args[0]) | 476 song = URIRef(args[0]) |
474 except IndexError: | 477 except IndexError: |
475 song = currentlyPlayingSong() | 478 song = currentlyPlayingSong() |