Files
@ 708cdf7c4dad
Branch filter:
Location: light9/bin/listsongs - annotation
708cdf7c4dad
717 B
text/plain
types and import fixes. jquery dep for reconnecting websocket display
Ignore-this: f74f3abcc899abfe0da9c0e1497fd73e
Ignore-this: f74f3abcc899abfe0da9c0e1497fd73e
d8202a0a7fd5 8a59efa577c1 8a59efa577c1 8a59efa577c1 8a59efa577c1 8a59efa577c1 8a59efa577c1 8a59efa577c1 8a59efa577c1 3c523c71da29 27d2f148b630 8a59efa577c1 a38955ba6f40 27d2f148b630 6fa4288da8a6 27d2f148b630 a38955ba6f40 8a59efa577c1 7772cc48e016 27d2f148b630 27d2f148b630 27d2f148b630 27d2f148b630 f066d6e874db 27d2f148b630 27d2f148b630 7772cc48e016 27d2f148b630 | #!bin/python
"""for completion, print the available song uris on stdout
in .zshrc:
function _songs { local expl; _description files expl 'songs'; compadd "$expl[@]" - `${LIGHT9_SHOW}/../../bin/listsongs` }
compdef _songs curvecalc
"""
from run_local import log # noqa
from twisted.internet import reactor
from rdflib import RDF
from light9 import networking
from light9.namespaces import L9
from rdfdb.syncedgraph import SyncedGraph
graph = SyncedGraph(networking.rdfdb.url, "listsongs")
@graph.initiallySynced.addCallback
def printSongs(result):
with graph.currentState() as current:
for song in current.subjects(RDF.type, L9['Song']):
print(song)
reactor.stop()
reactor.run()
|