Enable Markdown and HTML notifications. (#288)

This change enable defining the notification body as HTML or Markdown. This can be very
useful to have more user-friendly notifications such as:
* applying a heading style to the `{watch_title}` to make it stand out
* creating clickable links using the `{watch_url}`, `{preview_url}` and `{diff_url}`.

Changes
=======
* Add a `notification_format` to the notification settings, defaults to plain text.
* Use the `body_format` parameter of Apprise's `notify` method.

Co-authored-by: Malo Jaffré <malo.jaffre@dunnhumby.com>
This commit is contained in:
ghjklw
2021-12-04 14:41:48 +01:00
committed by GitHub
parent ff6dc842c0
commit ecba130fdb
7 changed files with 37 additions and 5 deletions

View File

@@ -47,6 +47,7 @@ class ChangeDetectionStore:
# Custom notification content
'notification_title': None,
'notification_body': None,
'notification_format': None,
}
}
}
@@ -73,6 +74,7 @@ class ChangeDetectionStore:
'notification_urls': [], # List of URLs to add to the notification Queue (Usually AppRise)
'notification_title': None,
'notification_body': None,
'notification_format': None,
'css_filter': "",
'trigger_text': [], # List of text or regex to wait for until a change is detected
'fetch_backend': None,