Plugin Event Handler - eliranwong/UniqueBible GitHub Wiki

Plugin Event Handlers allow you to run custom code when a UBA event occurs. Currently, only command events are supported.

Event handlers should be located in the plugins/event folder.

The name of the file should be in the format: [event type]_[event command].py (eg command_study.py, command_lexicon.py)

Event variables

Name Description
config.eventType type of event (eg. command)
config.eventCommand Command that is being executed (eg. LEXICON:::H8435)
config.eventContent HTML generated by command
config.eventView Name of window HTML will be displayed in

Examples

To print variables whenever the STUDY command is executed.

command_study.py

import config

print(config.eventType)
print(config.eventCommand)
print(config.eventView)
print(config.eventContent)