Updated plugin system. /JL

This commit is contained in:
2025-02-21 17:08:46 +01:00
parent 45520fc412
commit ea9ad1702b
7 changed files with 171 additions and 75 deletions
+6
View File
@@ -0,0 +1,6 @@
{
"name": "Example Plugin",
"version": "1.0",
"module": "example_plugin",
"description": "An example plugin that prints a message."
}
+16 -5
View File
@@ -1,6 +1,17 @@
from plugin_system import PluginInterface
from xtendr import XtendRBase
class ExamplePlugin(PluginInterface):
def execute(self, *args, **kwargs):
print("ExamplePlugin executed with args:", args, "and kwargs:", kwargs)
return "Execution complete!"
class ExamplePlugin(XtendRBase):
"""Example plugin implementation.
Example:
>>> plugin = ExamplePlugin()
>>> plugin.run()
ExamplePlugin is running!
>>> plugin.stop()
ExamplePlugin has stopped!
"""
def run(self):
print("ExamplePlugin is running!")
def stop(self):
print("ExamplePlugin has stopped!")