aboutsummaryrefslogtreecommitdiffstats
path: root/genwscript.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-10-14 21:10:34 +0000
committerDavid Robillard <d@drobilla.net>2011-10-14 21:10:34 +0000
commit078fc74dadea5096ef72e2c68f82a10fe7a1ad1b (patch)
tree166191ec5776cf5e4ced45e8edf19ba513e67e68 /genwscript.py
parent0ab849bc2b570d2e3c56ad853f1347a2e4f6a39b (diff)
downloadlv2-078fc74dadea5096ef72e2c68f82a10fe7a1ad1b.tar.xz
Simple name/dir code.
Diffstat (limited to 'genwscript.py')
-rw-r--r--genwscript.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/genwscript.py b/genwscript.py
index e4e020e..e7bafb8 100644
--- a/genwscript.py
+++ b/genwscript.py
@@ -4,7 +4,6 @@
import rdflib
import glob
import os
-import re
import shutil
lv2 = rdflib.Namespace('http://lv2plug.in/ns/lv2core#')
@@ -18,11 +17,8 @@ def query(model, s, p, o):
raise Exception('Bad LV2 extension data')
def genwscript(manifest):
- match = re.search('.*/([^/]*).lv2/.*', manifest)
- name = match.group(1)
-
- match = re.search('(.*)/.*', manifest)
- dir = match.group(1)
+ dir = os.path.dirname(manifest)
+ name = os.path.basename(dir).replace('.lv2', '')
m = rdflib.ConjunctiveGraph()
m.parse('file:' + manifest, format='n3')