From 80b74f79dfbfa9afb845172a5ea84110d75f1bc8 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Thu, 13 Mar 2025 01:01:20 +0800 Subject: refactor(project)!: first implementation of the Conventional Role Play SDK with core components, renderers, extractors, and example usage. --- examples/custom_plugin.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 examples/custom_plugin.py (limited to 'examples/custom_plugin.py') diff --git a/examples/custom_plugin.py b/examples/custom_plugin.py new file mode 100644 index 0000000..74a0bcc --- /dev/null +++ b/examples/custom_plugin.py @@ -0,0 +1,25 @@ +from trpg_log_processor.plugins.plugin_manager import PluginManager + +class CustomPlugin: + def __init__(self): + self.name = "Custom Plugin" + + def process(self, data): + # Custom processing logic + processed_data = data.upper() # Example transformation + return processed_data + +def main(): + plugin_manager = PluginManager() + custom_plugin = CustomPlugin() + + plugin_manager.register_plugin(custom_plugin) + + # Example data to process + data = "This is a sample TRPG log." + result = custom_plugin.process(data) + + print(f"Processed Data: {result}") + +if __name__ == "__main__": + main() \ No newline at end of file -- cgit v1.2.3-70-g09d2