+ Framework: include <limits.h> for INT_MAX
[calf.git] / bigbull / inspect.py
blob7907c366181ce9ab0cba3933048ddf1634feed55
1 #!/usr/bin/env python
2 import os
3 import sys
4 import fakeserv
5 import lv2
6 import client
8 fakeserv.start()
10 db = lv2.LV2DB()
11 plugins = db.getPluginList()
13 for uri in plugins:
14 plugin = db.getPluginInfo(uri)
15 print "Plugin: %s" % plugin.name
16 if plugin.microname != None: print "Tiny name: %s" % plugin.microname
17 print "License: %s" % plugin.license
18 print "Classes: %s" % plugin.classes
19 print "Required features: %s" % list(plugin.requiredFeatures)
20 print "Optional features: %s" % list(plugin.optionalFeatures)
21 print "Ports:"
22 types = ["Audio", "Control", "Event", "Input", "Output"]
23 for port in plugin.ports:
24 extra = []
25 for type in types:
26 if port.__dict__["is" + type]:
27 extra.append(type)
28 for sp in ["defaultValue", "minimum", "maximum", "microname"]:
29 if port.__dict__[sp] != None:
30 extra.append("%s=%s" % (sp, repr(port.__dict__[sp])))
31 print "%4s %-20s %-40s %s" % (port.index, port.symbol, port.name, ", ".join(extra))
32 splist = port.scalePoints
33 splist.sort(lambda x, y: cmp(x[1], y[1]))
34 if len(splist):
35 for sp in splist:
36 print " Scale point %s: %s" % (sp[1], sp[0])
37 #print port
38 print