How to create plugin for Bluemindo ?
First, you should take a look at this file (the classes that load and manage both modules and plugins) :
src/extensionsloader.py and src/gui/extensionsconfig.py.
You can find all officials plugins at this directory:
There is a list of all signals that you can use in the src/extensionsloader.py file. Some of them are called on Bluemindo starting or on GUI events. The concept is to connect one of your function to a signal. Once the signal is loaded in the software, the function will be launched. You can also load one of these signals.
If you think you need another signal, please report a bug, at this URL : project/bluemindo/bugs
The 4 rules.
There are some rules you have to respect:
- the plugin have to be in the Bluemindo's unofficial plugins directory (by default $HOME/.local/share/bluemindo/unofficial_plugins)
- the plugin have to had at least an author, a licence and a description
- the plugin have to follow the XDG Base Directory Specification
- the plugin should use ConfigParser for configuration
The AboutDialog of your plugin is generated, you don't have to write it. The logo can be a GTK Stock Item or a file located in your plugin directory.
You are encouraged to read the code of existing modules and plugins to know more about Bluemindo. You can join the room email@example.com for more informations on Bluemindo hack :-)
Here is an example of a plugin that writes the title of the song in the console, when a new song is launched.
If you want to add a configuration interface to your plugin, you have to set self.plugin['configurable'] = True. You also have to use two signals: OnModuleConfiguration and OnModuleConfigurationSave.
A plugin `Exampleplugin` is in a directory named `exampleplugin`, that only have to contains a __init__.py (but you can add .py files or anything else ;-)).