Plugin Descriptors for beaTlets

Regular Java plugins for beaTunes have to communicate a number of things about themselves. Things like their own version, the beaTunes version they require, change notes, author, license etc. Because beaTlets aren't distributed through the central plugin repository, they are not required to do so. However, if you plan on distributing your beaTlet in any way, it's a good idea to declare a plugin descriptor. Plus, it looks nice in the plugins preferences pane :-)

beaTlet properties in the plugin preference pane

Unlike the declarative XML file used for Java plugins, beaTlets declare themselves programmatically. They should implement the com.tagtraum.core.app.Plugin interface. All this interface does, is provide a method to return a PluginDescriptor.

Here's how it's done:

from com.tagtraum.core.app import *

class PluginDescriptorDemo(Plugin):

    def getPluginDescriptor(self):
        pd = PluginDescriptor()
        pd.setId("com.yourdomain.someid.py")
        pd.setName("Our pretty cool Jython beaTlet")
        pd.setDescription("And here we describe what it does ...")
        pd.setLicenseName("LGPL")
        pd.setVersion(Version("1.0.0"))
        pd.setMinBeaTunesVersion(Version("3.0.0"))
        pd.setMaxBeaTunesVersion(Version("3.5.0"))
        # etc.
        return pd