mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-05-01 15:20:33 +00:00
More work on plugins
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user