Updated plugin system. /JL
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "Example Plugin",
|
||||
"version": "1.0",
|
||||
"module": "example_plugin",
|
||||
"description": "An example plugin that prints a message."
|
||||
}
|
||||
@@ -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!")
|
||||
|
||||
Reference in New Issue
Block a user