Files @ c2faa69099e6
Branch filter:

Location: light9/bin/listsongs - annotation

drewp@bigasterisk.com
asco: display update frequency and dim when updates stop. run slower updates on tablets and phones
Ignore-this: 2439d0f540c9eae00c4f18e26411c100
#!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()