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
+21
View File
@@ -0,0 +1,21 @@
from xtendr.xtendr import XtendR
if __name__ == "__main__":
"""Example usage of the PluginSystem.
Example:
>>> system = XtendR()
>>> system.attach("example_plugin")
Attached plugin 'example_plugin'.
>>> system.run("example_plugin")
ExamplePlugin is running!
>>> system.stop("example_plugin")
ExamplePlugin has stopped!
>>> system.detach("example_plugin")
Detached plugin 'example_plugin'.
"""
system = XtendR()
system.attach("example_plugin") # Assuming 'example_plugin/plugin_info.json' exists
system.run("example_plugin")
system.stop("example_plugin")
system.detach("example_plugin")