removed modify due to the way difflib reacts to changes

diff-proposed-for-bwees
bwees 3 years ago
parent 83565787ae
commit 159b062cb3

@ -280,7 +280,6 @@ class perform_site_check():
diff_filters = {
"add": watch.get('trigger_on_add', True),
"del": watch.get('trigger_on_del', True),
"modify": watch.get('trigger_on_modify', True)
}
if False in diff_filters.values(): # if we are supposed to filter any diff types

@ -346,8 +346,6 @@ class watchForm(commonSettingsForm):
text_should_not_be_present = StringListField('Block change-detection if text matches', [validators.Optional(), ValidateListRegex()])
trigger_on_add = BooleanField('Additions', default=True)
trigger_on_del = BooleanField('Deletions', default=True)
trigger_on_modify = BooleanField('Modifications', default=True)
webdriver_js_execute_code = TextAreaField('Execute JavaScript before change detection', render_kw={"rows": "5"}, validators=[validators.Optional()])

@ -45,7 +45,6 @@ class model(dict):
'check_unique_lines': False, # On change-detected, compare against all history if its something new
'trigger_on_add': True, # Allow a trigger if there are additions from the last snapshot
'trigger_on_del': True, # Allow a trigger if there are deletions from the last snapshot
'trigger_on_modify': True, # Allow a trigger if there are changes from the last snapshot
'proxy': None, # Preferred proxy connection
'previous_text': False, # Previous text from the last snapshot, this is updated after every fetch including if a diff was triggered or not
# Re #110, so then if this is set to None, we know to use the default value instead
@ -192,7 +191,6 @@ class model(dict):
diff_types = {
'add': False,
'del': False,
'modify': False,
}
# get diff types using difflib
@ -200,8 +198,6 @@ class model(dict):
for tag, alo, ahi, blo, bhi in cruncher.get_opcodes():
if tag == 'delete':
diff_types["del"] = True
elif tag == 'replace':
diff_types["modify"] = True
elif tag == 'insert':
diff_types["add"] = True

@ -161,7 +161,6 @@ User-Agent: wonderbra 1.0") }}
<label for="trigger-type">Trigger On</label>
{{ render_checkbox_field(form.trigger_on_add, class="trigger-type") }}
{{ render_checkbox_field(form.trigger_on_del, class="trigger-type") }}
{{ render_checkbox_field(form.trigger_on_modify, class="trigger-type") }}
<span class="pure-form-message-inline">
This filter only compares to the previous snapshot. This is different from the "Only trigger when new lines appear" setting which checks all previous snapshots.
This is good for filtering out notifications for only content being removed.

Loading…
Cancel
Save