Files
@ fa5d2a518b12
Branch filter:
Location: light9/bin/listsongs - annotation
fa5d2a518b12
662 B
text/plain
checkpoint - first song done
Ignore-this: a805fff2a629397c69bf911994a6f5cf
Ignore-this: a805fff2a629397c69bf911994a6f5cf
d8202a0a7fd5 8a59efa577c1 8a59efa577c1 8a59efa577c1 8a59efa577c1 8a59efa577c1 8a59efa577c1 8a59efa577c1 8a59efa577c1 8a59efa577c1 27d2f148b630 27d2f148b630 8a59efa577c1 27d2f148b630 27d2f148b630 27d2f148b630 27d2f148b630 8a59efa577c1 27d2f148b630 27d2f148b630 27d2f148b630 27d2f148b630 27d2f148b630 27d2f148b630 27d2f148b630 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
from twisted.internet import reactor
from rdflib import RDF
from light9.namespaces import L9
from light9.rdfdb.syncedgraph import SyncedGraph
graph = SyncedGraph("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()
|