[SCM] calf/master: + Framework: another microname fix + Big Bull: display micronames for ports and plugins in inspect.py

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:37:38 UTC 2013


The following commit has been merged in the master branch:
commit 7eeec91e754cb41241fa35dcf0aa68122e348497
Author: kfoltman <kfoltman at 78b06b96-2940-0410-b7fc-879d825d01d8>
Date:   Fri Sep 26 20:04:31 2008 +0000

    + Framework: another microname fix
    + Big Bull: display micronames for ports and plugins in inspect.py
    
    
    git-svn-id: https://calf.svn.sourceforge.net/svnroot/calf/trunk@303 78b06b96-2940-0410-b7fc-879d825d01d8

diff --git a/bigbull/inspect.py b/bigbull/inspect.py
index 59dbb76..7907c36 100755
--- a/bigbull/inspect.py
+++ b/bigbull/inspect.py
@@ -13,6 +13,7 @@ plugins = db.getPluginList()
 for uri in plugins:
     plugin = db.getPluginInfo(uri)
     print "Plugin: %s" % plugin.name
+    if plugin.microname != None: print "Tiny name: %s" % plugin.microname
     print "License: %s" % plugin.license
     print "Classes: %s" % plugin.classes
     print "Required features: %s" % list(plugin.requiredFeatures)
@@ -24,9 +25,9 @@ for uri in plugins:
         for type in types:
             if port.__dict__["is" + type]:
                 extra.append(type)
-        for sp in ["defaultValue", "minimum", "maximum"]:
+        for sp in ["defaultValue", "minimum", "maximum", "microname"]:
             if port.__dict__[sp] != None:
-                extra.append("%s=%s" % (sp, port.__dict__[sp]))
+                extra.append("%s=%s" % (sp, repr(port.__dict__[sp])))
         print "%4s %-20s %-40s %s" % (port.index, port.symbol, port.name, ", ".join(extra))
         splist = port.scalePoints
         splist.sort(lambda x, y: cmp(x[1], y[1]))
diff --git a/bigbull/lv2.py b/bigbull/lv2.py
index 28f6be7..71332cb 100644
--- a/bigbull/lv2.py
+++ b/bigbull/lv2.py
@@ -10,6 +10,7 @@ rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 rdfs = "http://www.w3.org/2000/01/rdf-schema#"
 epi = "http://lv2plug.in/ns/dev/extportinfo#"
 rdf_type = rdf + "type"
+tinyname_uri = "http://lv2plug.in/ns/dev/tiny-name"
 
 class DumpRDFModel:
     def addTriple(self, s, p, o):
@@ -238,6 +239,11 @@ class LV2DB:
         dest.classes = info.bySubject[uri]["a"]
         dest.requiredFeatures = info.getProperty(uri, lv2 + "requiredFeature", optional = True)
         dest.optionalFeatures = info.getProperty(uri, lv2 + "optionalFeature", optional = True)
+        dest.microname = info.getProperty(uri, tinyname_uri, optional = True)
+        if len(dest.microname):
+            dest.microname = dest.microname[0]
+        else:
+            dest.microname = None
         ports = []
         portDict = {}
         porttypes = {
@@ -274,6 +280,7 @@ class LV2DB:
             pdata.defaultValue = info.getProperty(psubj, [lv2 + "default"], optional = True, single = True)
             pdata.minimum = info.getProperty(psubj, [lv2 + "minimum"], optional = True, single = True)
             pdata.maximum = info.getProperty(psubj, [lv2 + "maximum"], optional = True, single = True)
+            pdata.microname = info.getProperty(psubj, [tinyname_uri], optional = True, single = True)
             pdata.properties = set(info.getProperty(psubj, [lv2 + "portProperty"], optional = True))
             ports.append(pdata)
             portDict[pdata.uri] = pdata
diff --git a/src/makerdf.cpp b/src/makerdf.cpp
index 78dcaf3..af83fde 100644
--- a/src/makerdf.cpp
+++ b/src/makerdf.cpp
@@ -438,7 +438,7 @@ void make_ttl(string path_prefix)
         
         ttl += "    doap:name \""+string(pi->label)+"\" ;\n";
         ttl += "    doap:license <http://usefulinc.com/doap/licenses/lgpl> ;\n";
-        if (pi->microname != "N/A")
+        if (!pi->microname.empty())
             ttl += "    <http://lv2plug.in/ns/dev/tiny-name> \"" + pi->microname + "\" ;\n";
 
         if (!pi->ports.empty())

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list