diff --git a/changedetectionio/blueprint/settings/templates/settings.html b/changedetectionio/blueprint/settings/templates/settings.html index 9b808ffc..db4512dd 100644 --- a/changedetectionio/blueprint/settings/templates/settings.html +++ b/changedetectionio/blueprint/settings/templates/settings.html @@ -1,7 +1,7 @@ {% extends 'base.html' %} {% block content %} -{% from '_helpers.html' import render_field, render_checkbox_field, render_button, render_time_schedule_form %} +{% from '_helpers.html' import render_field, render_checkbox_field, render_button, render_time_schedule_form, render_ternary_field %} {% from '_common_fields.html' import render_common_settings_form %} @@ -103,7 +103,7 @@
- {{ render_checkbox_field(form.use_page_title_in_list) }} + {{ render_ternary_field(form.use_page_title_in_list) }}
{{ render_checkbox_field(form.filter_failure_notification_send) }} @@ -199,7 +199,7 @@ Math: {{ 1 + 1 }}") }}
@@ -263,11 +263,11 @@ Math: {{ 1 + 1 }}") }}
- {{ render_checkbox_field(form.notification_muted) }} + {{ render_ternary_field(form.notification_muted) }}
{% if watch_needs_selenium_or_playwright %}
- {{ render_checkbox_field(form.notification_screenshot) }} + {{ render_ternary_field(form.notification_screenshot, BooleanField=true) }} Use with caution! This will easily fill up your email storage quota or flood other storages. @@ -323,27 +323,27 @@ Math: {{ 1 + 1 }}") }}

Text filtering

Limit trigger/ignore/block/extract to;
- {{ render_checkbox_field(form.filter_text_added) }} - {{ render_checkbox_field(form.filter_text_replaced) }} - {{ render_checkbox_field(form.filter_text_removed) }} + {{ render_ternary_field(form.filter_text_added, BooleanField=true) }} + {{ render_ternary_field(form.filter_text_replaced, BooleanField=true) }} + {{ render_ternary_field(form.filter_text_removed, BooleanField=true) }} Note: Depending on the length and similarity of the text on each line, the algorithm may consider an addition instead of replacement for example.
 So it's always better to select Added+Replaced when you're interested in new content.
 When content is merely moved in a list, it will also trigger an addition, consider enabling Only trigger when unique lines appear
- {{ render_checkbox_field(form.check_unique_lines) }} + {{ render_ternary_field(form.check_unique_lines, BooleanField=true) }} Good for websites that just move the content around, and you want to know when NEW content is added, compares new lines against all history for this watch.
- {{ render_checkbox_field(form.remove_duplicate_lines) }} + {{ render_ternary_field(form.remove_duplicate_lines, BooleanField=true) }} Remove duplicate lines of text
- {{ render_checkbox_field(form.sort_text_alphabetically) }} + {{ render_ternary_field(form.sort_text_alphabetically, BooleanField=true) }} Helps reduce changes detected caused by sites shuffling lines around, combine with check unique lines below.
- {{ render_checkbox_field(form.trim_text_whitespace) }} + {{ render_ternary_field(form.trim_text_whitespace, BooleanField=true) }} Remove any whitespace before and after each line of text
{% include "edit/text-options.html" %} diff --git a/changedetectionio/forms.py b/changedetectionio/forms.py index 24ded23e..3402b0c2 100644 --- a/changedetectionio/forms.py +++ b/changedetectionio/forms.py @@ -28,6 +28,8 @@ from wtforms.validators import ValidationError from validators.url import url as url_validator +from changedetectionio.widgets import TernaryNoneBooleanField + # default # each select