summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-03-16 23:41:49 +0000
committerDavid Robillard <d@drobilla.net>2015-03-16 23:41:49 +0000
commit9b568f59b0b12ad6d722106a8fd50e6fdb6c304e (patch)
tree55a531ae52e009dc4bde8262e8a5b57f5a638cc8
parentc83c763732b2f493aa451db3390c38aafa1eaa15 (diff)
downloadingen-9b568f59b0b12ad6d722106a8fd50e6fdb6c304e.tar.gz
ingen-9b568f59b0b12ad6d722106a8fd50e6fdb6c304e.tar.bz2
ingen-9b568f59b0b12ad6d722106a8fd50e6fdb6c304e.zip
Add get command to ingenish.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5641 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--scripts/ingen.py5
-rwxr-xr-xscripts/ingenish2
2 files changed, 7 insertions, 0 deletions
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: