More work on plugins

This commit is contained in:
dgtlmoon
2025-03-19 15:52:31 +01:00
parent 9a073fc9aa
commit 673ec24fa3
4 changed files with 54 additions and 4 deletions
@@ -1,14 +1,20 @@
"""
Example plugin to demonstrate how to create a new processor plugin
"""
from .pluggy_interface import hookimpl
import importlib
class ExampleProcessorPlugin:
"""
Example processor plugin that extends the text_json_diff processor
"""
def random_string(self, length=50):
import random
import string
return ''.join(random.choices(string.ascii_letters + string.digits, k=length))
@hookimpl
def get_processor_name(self):
return "example_processor"