mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-09-23 22:06:58 +00:00
WIP
This commit is contained in:
@@ -15,8 +15,8 @@ operator_choices = [
|
||||
("contains_regex", "Text Matches Regex"),
|
||||
("!contains_regex", "Text Does NOT Match Regex"),
|
||||
("changed > minutes", "Changed more than X minutes ago"),
|
||||
("watch_uuid_unviewed_change", "Watch UUID had an unviewed change"),
|
||||
("watch_uuid_not_unviewed_change", "Watch UUID NOT had an unviewed change")
|
||||
# ("watch_uuid_unviewed_change", "Watch UUID had an unviewed change"), #('if'? )
|
||||
# ("watch_uuid_not_unviewed_change", "Watch UUID NOT had an unviewed change") #('if'? )
|
||||
# ("watch_uuid_changed", "Watch UUID had unviewed change"),
|
||||
# ("watch_uuid_not_changed", "Watch UUID did NOT have unviewed change"),
|
||||
# ("!!", "Is Truthy"),
|
||||
@@ -37,15 +37,13 @@ operator_choices = [
|
||||
# Fields available in the rules
|
||||
field_choices = [
|
||||
("extracted_number", "Extracted Number"),
|
||||
("diff_removed", "Diff Removed"),
|
||||
("diff_added", "Diff Added"),
|
||||
("page_text", "Page Text"),
|
||||
("page_title", "Page Title"),
|
||||
("page_filtered_text", "Page text After Filters"),
|
||||
("page_title", "Page Title"), # actual page title <title>
|
||||
("watch_uuid", "Watch UUID"),
|
||||
("watch_history_length", "History Length"),
|
||||
("watch_history", "All Watch Text History"),
|
||||
("watch_check_count", "Watch Check Count"),
|
||||
("watch_uuid", "Other Watch by UUID"),
|
||||
("watch_uuid", "Other Watch by UUID"), # (Maybe this is 'if' ??)
|
||||
#("requests_get", "Web GET requests (https://..)")
|
||||
]
|
||||
|
||||
@@ -95,5 +93,6 @@ def run(ruleset, data):
|
||||
try:
|
||||
return jsonLogic(ruleset, data, CUSTOM_OPERATIONS)
|
||||
except Exception as e:
|
||||
# raise some custom nice handler
|
||||
print(f"❌ Error evaluating JSON Logic: {e}")
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user