I want to create a community/custom plugin and was testing the HelloWorld example you have provided onhttps://gitlab.com/openlp/wiki/-/wikis/Development/Plugin_Developers_Guide#plugin-architecture
But somehow I am unable to register the same. Can you please guide me where I am going wrong, what I am missing? Thanks in advanceeven tried putting blank init.py... tried on python 3.10/3.13
C:\Program Files\OpenLP\plugins\helloworld, created two files with codes as below:
init.py
helloworld.py(also created a \contrib but did not help)
*****************************from .helloworld import HelloWorldPlugin
def register_plugin():
"""Register the Hello World plugin with OpenLP."""
return HelloWorldPlugin()
from openlp.core.lib.plugin import Plugin
from openlp.core.common.registry import Registry
from openlp.core.state import State
import logging
log = logging.getLogger(name)
class ThemeManager(Plugin):
"""
Theme Plugin for managing song display themes in OpenLP.
"""
def init(self):
"""Initialize the Theme Plugin."""
super().init('thememanager')
self.display_name = "Theme Manager"
log.info(" Theme Manager Plugin: init() executed")
def initialise(self):
"""Initialise the Theme Plugin."""
log.info(" Theme Manager Plugin: initialise() called")
# Register in State
State().add_service(self.name, weight=0, is_plugin=True)
# Register in Registry
Registry().register('thememanager', self)
# Register a test event
Registry().register_event('theme_update_list')
super().initialise()