-
-
Notifications
You must be signed in to change notification settings - Fork 38
UBA Menu Plugins
UBA plugins are plugins accessible through UBA menu.
A valid plugin file should be written in python with file extension ".py".
Read https://github.com/eliranwong/UniqueBible/wiki/UBA-Plugins for other types of UBA plugins.
All UBA menu plugins are placed in folder "plugins/menu/" inside UniqueBible home directory.
You need to have "enablePlugins" checked on "Set Config Flags" window to use UBA plugins.
config.mainWindow points to the mainWindow of UBA. This gives developer an access point of UBA built-in functions.
A context plugin could be as simple as below, to display a message in a dialog window.
import config
config.mainWindow.displayMessage("Testing a plugin!")
You may have multiple files for a plugin and some of which are shared library files, which you do not want to display on menu.
You can do this by placing them into a sub-folder. Python files placed inside a sub-folder within the directory "plugins/menu/" are not displayed on menu.
Description: https://github.com/eliranwong/UniqueBible/wiki/Notes-Backup-with-Google-Drive
Source codes: https://github.com/eliranwong/UniqueBible/tree/master/plugins/menu
You can simply COPY plugin files from "plugins/menu/" to "plugins/startup/" or "plugins/shutdown/" to automate a plugin on UBA startup / shutdown.
For example, https://github.com/eliranwong/UniqueBible/wiki/Notes-Backup-with-Google-Drive#automate-restoration-on-startup