From 9b568f59b0b12ad6d722106a8fd50e6fdb6c304e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 16 Mar 2015 23:41:49 +0000 Subject: Add get command to ingenish. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5641 a436a847-0d15-0410-975c-d299462d15a1 --- scripts/ingen.py | 5 +++++ scripts/ingenish | 2 ++ 2 files changed, 7 insertions(+) diff --git a/scripts/ingen.py b/scripts/ingen.py index 7f82b799..158a1b81 100644 --- a/scripts/ingen.py +++ b/scripts/ingen.py @@ -25,11 +25,13 @@ except ImportError: from io import StringIO as StringIO class NS: + atom = rdflib.Namespace('http://lv2plug.in/ns/ext/atom#') ingen = rdflib.Namespace('http://drobilla.net/ns/ingen#') ingerr = rdflib.Namespace('http://drobilla.net/ns/ingen/errors#') lv2 = rdflib.Namespace('http://lv2plug.in/ns/lv2core#') patch = rdflib.Namespace('http://lv2plug.in/ns/ext/patch#') rdf = rdflib.Namespace('http://www.w3.org/1999/02/22-rdf-syntax-ns#') + rsz = rdflib.Namespace('http://lv2plug.in/ns/ext/resize-port#') xsd = rdflib.Namespace('http://www.w3.org/2001/XMLSchema#') class Interface: @@ -37,6 +39,9 @@ class Interface: def put(self, path, body): pass + def get(self, path): + pass + def set(self, path, body): pass diff --git a/scripts/ingenish b/scripts/ingenish index ff1a0622..b5daf186 100755 --- a/scripts/ingenish +++ b/scripts/ingenish @@ -67,6 +67,8 @@ def run(cmd): print_usage() elif cmd[0] == 'exit': sys.exit(0) + elif cmd[0] == 'get' and len(cmd) == 2: + print(ingen.get(cmd[1]).serialize(format='n3')) elif cmd[0] == 'put' and len(cmd) == 3: return ingen.put(cmd[1], cmd[2]) elif cmd[0] == 'set' and len(cmd) == 3: -- cgit v1.2.1