import logging
import os
from pathlib import Path
from light9.run_local import log
import rdfdb.service
from rdflib import URIRef
from light9 import showconfig
logging.getLogger('rdfdb').setLevel(logging.INFO)
logging.getLogger('rdfdb.file').setLevel(logging.INFO)
logging.getLogger('rdfdb.graph').setLevel(logging.INFO)
logging.getLogger('rdfdb.net').setLevel(logging.INFO)
rdfRoot = Path(os.environ['LIGHT9_SHOW'].rstrip('/') + '/')
showUri = URIRef(showconfig.showUri() + '/')
app = rdfdb.service.makeApp( #
dirUriMap={rdfRoot: showUri},
prefixes={
'show': showUri,
'': URIRef('http://light9.bigasterisk.com/'),
'rdf': URIRef('http://www.w3.org/1999/02/22-rdf-syntax-ns#'),
'rdfs': URIRef('http://www.w3.org/2000/01/rdf-schema#'),
'xsd': URIRef('http://www.w3.org/2001/XMLSchema#'),
'effect': URIRef('http://light9.bigasterisk.com/effect/'),
'dev': URIRef('http://light9.bigasterisk.com/theater/skyline/device/'),
})