Plugins¶
Introduction¶
Plugins extend Organizer with new loaders and actions without modifying the core application.
A plugin is a folder containing a plugin.json manifest and whatever executable it needs, be it a Python script, a Node.js file, a compiled binary, or pretty much anything that can read from stdin and write to stdout.
Installing a plugin¶
Place the plugin folder in any of the directories below. All paths are scanned and all plugins loaded; if two plugins provide the same key, the first path in the list wins.
%ORGANIZER_PLUGINS%(if set)%APPDATA%\Organizer\plugins\%ProgramData%\Organizer\plugins\<install directory>\plugins\
$ORGANIZER_PLUGINS(if set)~/.local/share/organizer/plugins//usr/local/share/organizer/plugins//usr/share/organizer/plugins/<install directory>/plugins/
$ORGANIZER_PLUGINS(if set)~/Library/Application Support/organizer/plugins/<install directory>/plugins/
The folder name is arbitrary. The only required file is plugin.json.
plugins/
my-plugin/
plugin.json
script.py # and any other files the plugin needs
Using a plugin¶
Once installed, a plugin's loaders and actions are used exactly like built-in ones.
Plugin loaders¶
Use the plugin's loader key as the data field:
{
"data": "my_loader",
"some_option": "value",
"glob": "*expected_value*"
}
Template variable: {my_loader}, or {my_loader.subfield} if the plugin exposes sub-fields.
Plugin actions¶
Use the plugin's action type as the type field. All other fields are forwarded to the plugin as-is:
{
"type": "my_action",
"key": "value"
}