This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Under the hood, the NotifyBase class becomes AsyncNotifyBase() when Python 3 is detected | |
# see https://github.com/caronc/apprise/blob/ef2057c10aabd8119796338f41cd7970daeaacf9/apprise/py3compat/asyncio.py#L96 | |
# The big difference is this introduces a new function called async_notify() | |
# which is called under the hood when you call Apprise().notify(). | |
import apprise | |
import asyncio | |
# Add say... 2 entries: | |
aobj = apprise.Apprise() | |
aobj.add('mailto://user:[email protected]') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Send 'HTML' content to Slack via Apprise. | |
# At this time (Mar 12th, 2021), Apprise can not convert HTML -> Markdown | |
# but luckily there are lots of tools that can do this for you: | |
# here is one; Requirement: | |
# > pip install html2markdown | |
import html2markdown | |
import apprise | |
# convert your HTML code to it's markdown equivalent: |