Dynamic notification providers provisioning

pull/222/head
Halali 6 years ago
parent 32f7909605
commit 4d37267078

@ -20,6 +20,12 @@ CREATE TABLE "table_settings_providers" (
`password` "text",
PRIMARY KEY(`name`)
);
CREATE TABLE "table_settings_notifier" (
`name` TEXT,
`url` TEXT,
`enabled` INTEGER,
PRIMARY KEY(`name`)
);
CREATE TABLE "table_settings_languages" (
`code3` TEXT NOT NULL UNIQUE,
`code2` TEXT,

@ -17,6 +17,8 @@ import signal
import sqlite3
from init import *
from update_db import *
from notifier import update_notifier
update_notifier()
from get_settings import get_general_settings, get_proxy_settings
@ -248,7 +250,7 @@ def wizard():
@route(base_url + 'save_wizard', method='POST')
@custom_auth_basic(check_credentials)
def save_settings():
def save_wizard():
authorize()
conn = sqlite3.connect(os.path.join(config_dir, 'db/bazarr.db'), timeout=30)
@ -1323,197 +1325,16 @@ def save_settings():
with open(config_file, 'wb') as f:
cfg.write(f)
settings_notifier_Boxcar_enabled = request.forms.get('settings_notifier_Boxcar_enabled')
if settings_notifier_Boxcar_enabled == 'on':
settings_notifier_Boxcar_enabled = 1
else:
settings_notifier_Boxcar_enabled = 0
settings_notifier_Boxcar_url = request.forms.get('settings_notifier_Boxcar_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Boxcar'", (settings_notifier_Boxcar_enabled, settings_notifier_Boxcar_url))
settings_notifier_Faast_enabled = request.forms.get('settings_notifier_Faast_enabled')
if settings_notifier_Faast_enabled == 'on':
settings_notifier_Faast_enabled = 1
else:
settings_notifier_Faast_enabled = 0
settings_notifier_Faast_url = request.forms.get('settings_notifier_Faast_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Faast'", (settings_notifier_Faast_enabled, settings_notifier_Faast_url))
settings_notifier_Growl_enabled = request.forms.get('settings_notifier_Growl_enabled')
if settings_notifier_Growl_enabled == 'on':
settings_notifier_Growl_enabled = 1
else:
settings_notifier_Growl_enabled = 0
settings_notifier_Growl_url = request.forms.get('settings_notifier_Growl_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Growl'", (settings_notifier_Growl_enabled, settings_notifier_Growl_url))
settings_notifier_Join_enabled = request.forms.get('settings_notifier_Join_enabled')
if settings_notifier_Join_enabled == 'on':
settings_notifier_Join_enabled = 1
else:
settings_notifier_Join_enabled = 0
settings_notifier_Join_url = request.forms.get('settings_notifier_Join_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Join'", (settings_notifier_Join_enabled, settings_notifier_Join_url))
settings_notifier_KODI_enabled = request.forms.get('settings_notifier_KODI_enabled')
if settings_notifier_KODI_enabled == 'on':
settings_notifier_KODI_enabled = 1
else:
settings_notifier_KODI_enabled = 0
settings_notifier_KODI_url = request.forms.get('settings_notifier_KODI_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'KODI'", (settings_notifier_KODI_enabled, settings_notifier_KODI_url))
settings_notifier_Mattermost_enabled = request.forms.get('settings_notifier_Mattermost_enabled')
if settings_notifier_Mattermost_enabled == 'on':
settings_notifier_Mattermost_enabled = 1
else:
settings_notifier_Mattermost_enabled = 0
settings_notifier_Mattermost_url = request.forms.get('settings_notifier_Mattermost_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Mattermost'", (settings_notifier_Mattermost_enabled, settings_notifier_Mattermost_url))
settings_notifier_NMA_enabled = request.forms.get('settings_notifier_Notify My Android_enabled')
if settings_notifier_NMA_enabled == 'on':
settings_notifier_NMA_enabled = 1
else:
settings_notifier_NMA_enabled = 0
settings_notifier_NMA_url = request.forms.get('settings_notifier_Notify My Android_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Notify My Android'", (settings_notifier_NMA_enabled, settings_notifier_NMA_url))
settings_notifier_Prowl_enabled = request.forms.get('settings_notifier_Prowl_enabled')
if settings_notifier_Prowl_enabled == 'on':
settings_notifier_Prowl_enabled = 1
else:
settings_notifier_Prowl_enabled = 0
settings_notifier_Prowl_url = request.forms.get('settings_notifier_Prowl_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Prowl'", (settings_notifier_Prowl_enabled, settings_notifier_Prowl_url))
settings_notifier_Pushalot_enabled = request.forms.get('settings_notifier_Pushalot_enabled')
if settings_notifier_Pushalot_enabled == 'on':
settings_notifier_Pushalot_enabled = 1
else:
settings_notifier_Pushalot_enabled = 0
settings_notifier_Pushalot_url = request.forms.get('settings_notifier_Pushalot_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Pushalot'", (settings_notifier_Pushalot_enabled, settings_notifier_Pushalot_url))
settings_notifier_PushBullet_enabled = request.forms.get('settings_notifier_PushBullet_enabled')
if settings_notifier_PushBullet_enabled == 'on':
settings_notifier_PushBullet_enabled = 1
else:
settings_notifier_PushBullet_enabled = 0
settings_notifier_PushBullet_url = request.forms.get('settings_notifier_PushBullet_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'PushBullet'", (settings_notifier_PushBullet_enabled, settings_notifier_PushBullet_url))
settings_notifier_Pushjet_enabled = request.forms.get('settings_notifier_Pushjet_enabled')
if settings_notifier_Pushjet_enabled == 'on':
settings_notifier_Pushjet_enabled = 1
else:
settings_notifier_Pushjet_enabled = 0
settings_notifier_Pushjet_url = request.forms.get('settings_notifier_Pushjet_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Pushjet'", (settings_notifier_Pushjet_enabled, settings_notifier_Pushjet_url))
settings_notifier_Pushover_enabled = request.forms.get('settings_notifier_Pushover_enabled')
if settings_notifier_Pushover_enabled == 'on':
settings_notifier_Pushover_enabled = 1
else:
settings_notifier_Pushover_enabled = 0
settings_notifier_Pushover_url = request.forms.get('settings_notifier_Pushover_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Pushover'", (settings_notifier_Pushover_enabled, settings_notifier_Pushover_url))
settings_notifier_RocketChat_enabled = request.forms.get('settings_notifier_Rocket.Chat_enabled')
if settings_notifier_RocketChat_enabled == 'on':
settings_notifier_RocketChat_enabled = 1
else:
settings_notifier_RocketChat_enabled = 0
settings_notifier_RocketChat_url = request.forms.get('settings_notifier_Rocket.Chat_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Rocket.Chat'", (settings_notifier_RocketChat_enabled, settings_notifier_RocketChat_url))
settings_notifier_Slack_enabled = request.forms.get('settings_notifier_Slack_enabled')
if settings_notifier_Slack_enabled == 'on':
settings_notifier_Slack_enabled = 1
else:
settings_notifier_Slack_enabled = 0
settings_notifier_Slack_url = request.forms.get('settings_notifier_Slack_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Slack'", (settings_notifier_Slack_enabled, settings_notifier_Slack_url))
settings_notifier_SuperToasty_enabled = request.forms.get('settings_notifier_Super Toasty_enabled')
if settings_notifier_SuperToasty_enabled == 'on':
settings_notifier_SuperToasty_enabled = 1
else:
settings_notifier_SuperToasty_enabled = 0
settings_notifier_SuperToasty_url = request.forms.get('settings_notifier_Super Toasty_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Super Toasty'", (settings_notifier_SuperToasty_enabled, settings_notifier_SuperToasty_url))
settings_notifier_Telegram_enabled = request.forms.get('settings_notifier_Telegram_enabled')
if settings_notifier_Telegram_enabled == 'on':
settings_notifier_Telegram_enabled = 1
else:
settings_notifier_Telegram_enabled = 0
settings_notifier_Telegram_url = request.forms.get('settings_notifier_Telegram_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Telegram'", (settings_notifier_Telegram_enabled, settings_notifier_Telegram_url))
settings_notifier_Twitter_enabled = request.forms.get('settings_notifier_Twitter_enabled')
if settings_notifier_Twitter_enabled == 'on':
settings_notifier_Twitter_enabled = 1
else:
settings_notifier_Twitter_enabled = 0
settings_notifier_Twitter_url = request.forms.get('settings_notifier_Twitter_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Twitter'", (settings_notifier_Twitter_enabled, settings_notifier_Twitter_url))
settings_notifier_XBMC_enabled = request.forms.get('settings_notifier_XBMC_enabled')
if settings_notifier_XBMC_enabled == 'on':
settings_notifier_XBMC_enabled = 1
else:
settings_notifier_XBMC_enabled = 0
settings_notifier_XBMC_url = request.forms.get('settings_notifier_XBMC_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'XBMC'", (settings_notifier_XBMC_enabled, settings_notifier_XBMC_url))
settings_notifier_Discord_enabled = request.forms.get('settings_notifier_Discord_enabled')
if settings_notifier_Discord_enabled == 'on':
settings_notifier_Discord_enabled = 1
else:
settings_notifier_Discord_enabled = 0
settings_notifier_Discord_url = request.forms.get('settings_notifier_Discord_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Discord'", (settings_notifier_Discord_enabled, settings_notifier_Discord_url))
settings_notifier_E_Mail_enabled = request.forms.get('settings_notifier_E-Mail_enabled')
if settings_notifier_E_Mail_enabled == 'on':
settings_notifier_E_Mail_enabled = 1
else:
settings_notifier_E_Mail_enabled = 0
settings_notifier_E_Mail_url = request.forms.get('settings_notifier_E-Mail_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'E-Mail'", (settings_notifier_E_Mail_enabled, settings_notifier_E_Mail_url))
settings_notifier_Emby_enabled = request.forms.get('settings_notifier_Emby_enabled')
if settings_notifier_Emby_enabled == 'on':
settings_notifier_Emby_enabled = 1
else:
settings_notifier_Emby_enabled = 0
settings_notifier_Emby_url = request.forms.get('settings_notifier_Emby_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Emby'", (settings_notifier_Emby_enabled, settings_notifier_Emby_url))
settings_notifier_IFTTT_enabled = request.forms.get('settings_notifier_IFTTT_enabled')
if settings_notifier_IFTTT_enabled == 'on':
settings_notifier_IFTTT_enabled = 1
else:
settings_notifier_IFTTT_enabled = 0
settings_notifier_IFTTT_url = request.forms.get('settings_notifier_IFTTT_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'IFTTT'", (settings_notifier_IFTTT_enabled, settings_notifier_IFTTT_url))
settings_notifier_Stride_enabled = request.forms.get('settings_notifier_Stride_enabled')
if settings_notifier_Stride_enabled == 'on':
settings_notifier_Stride_enabled = 1
else:
settings_notifier_Stride_enabled = 0
settings_notifier_Stride_url = request.forms.get('settings_notifier_Stride_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Stride'", (settings_notifier_Stride_enabled, settings_notifier_Stride_url))
settings_notifier_Windows_enabled = request.forms.get('settings_notifier_Windows_enabled')
if settings_notifier_Windows_enabled == 'on':
settings_notifier_Windows_enabled = 1
else:
settings_notifier_Windows_enabled = 0
settings_notifier_Windows_url = request.forms.get('settings_notifier_Windows_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Windows'", (settings_notifier_Windows_enabled, settings_notifier_Windows_url))
notifiers = c.execute("SELECT * FROM table_settings_notifier ORDER BY name").fetchall()
for notifier in notifiers:
enabled = request.forms.get('settings_notifier_' + notifier[0] + '_enabled')
if enabled == 'on':
enabled = 1
else:
enabled = 0
notifier_url = request.forms.get('settings_notifier_' + notifier[0] + '_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = ?",
(enabled, notifier_url, notifier[0]))
conn.commit()
c.close()

@ -3,6 +3,41 @@ from get_argv import config_dir
import apprise
import os
import sqlite3
import logging
def update_notifier():
# define apprise object
a = apprise.Apprise()
# Retrieve all of the details
results = a.details()
notifiers_new = []
notifiers_old = []
conn_db = sqlite3.connect(os.path.join(config_dir, 'db/bazarr.db'), timeout=30)
c_db = conn_db.cursor()
notifiers_current = c_db.execute('SELECT name FROM table_settings_notifier').fetchall()
for x in results['schemas']:
if x['service_name'] not in str(notifiers_current):
notifiers_new.append(x['service_name'])
logging.debug('Adding new notifier agent: ' + x['service_name'])
else:
notifiers_old.append(x['service_name'])
notifier_current = [i[0] for i in notifiers_current]
notifiers_to_delete = list(set(notifier_current) - set(notifiers_old))
for notifier_new in notifiers_new:
c_db.execute('INSERT INTO `table_settings_notifier` (name, enabled) VALUES (?, ?);', (notifier_new, '0'))
for notifier_to_delete in notifiers_to_delete:
c_db.execute('DELETE FROM `table_settings_notifier` WHERE name=?', (notifier_to_delete,))
conn_db.commit()
c_db.close()
def get_notifier_providers():
conn_db = sqlite3.connect(os.path.join(config_dir, 'db/bazarr.db'), timeout=30)

@ -16,69 +16,43 @@ if os.path.exists(os.path.join(config_dir, 'db/bazarr.db')) == True:
pass
else:
c.execute('UPDATE table_settings_providers SET username=""')
try:
c.execute('alter table table_settings_providers add column "password" "text"')
except:
pass
else:
c.execute('UPDATE table_settings_providers SET password=""')
try:
c.execute('alter table table_shows add column "audio_language" "text"')
except:
pass
try:
c.execute('CREATE TABLE `table_settings_notifier` (`name` TEXT, `url` TEXT, `enabled` INTEGER);')
except:
pass
else:
providers = ['Boxcar','Faast','Growl','Join','KODI','Mattermost','Notify My Android','Prowl','Pushalot','PushBullet','Pushjet','Pushover','Rocket.Chat','Slack','Super Toasty','Telegram','Twitter','XBMC']
for provider in providers:
c.execute('INSERT INTO `table_settings_notifier` (name, enabled) VALUES (?, ?);', (provider,'0'))
try:
c.execute('alter table table_shows add column "sortTitle" "text"')
except:
pass
try:
c.execute('CREATE TABLE "table_movies" ( `tmdbId` TEXT NOT NULL UNIQUE, `title` TEXT NOT NULL, `path` TEXT NOT NULL UNIQUE, `languages` TEXT, `subtitles` TEXT, `missing_subtitles` TEXT, `hearing_impaired` TEXT, `radarrId` INTEGER NOT NULL UNIQUE, `overview` TEXT, `poster` TEXT, `fanart` TEXT, "audio_language" "text", `sceneName` TEXT, PRIMARY KEY(`tmdbId`) )')
except:
pass
try:
c.execute('CREATE TABLE "table_history_movie" ( `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, `action` INTEGER NOT NULL, `radarrId` INTEGER NOT NULL, `timestamp` INTEGER NOT NULL, `description` TEXT NOT NULL )')
except:
pass
try:
c.execute('DELETE FROM table_settings_notifier WHERE rowid > 24') #Modify this if we add more notification provider
rows = c.execute('SELECT name FROM table_settings_notifier WHERE name = "Discord"').fetchall()
rows = c.execute('SELECT name FROM table_settings_notifier WHERE name = "Kodi/XBMC"').fetchall()
if len(rows) == 0:
providers = ['Discord', 'E-Mail', 'Emby', 'IFTTT', 'Stride', 'Windows']
for provider in providers:
c.execute('INSERT INTO `table_settings_notifier` (name, enabled) VALUES (?, ?);', (provider, '0'))
except:
pass
try:
c.execute('CREATE TABLE `system` ( `configured` TEXT, `updated` TEXT)')
c.execute('INSERT INTO `system` (configured, updated) VALUES (?, ?);', ('0', '0'))
providers = [['KODI', 'Kodi/XBMC'], ['Windows', 'Windows Notification'], ['Super Toasty', 'Toasty'],
['PushBullet', 'Pushbullet'], ['Mattermost', 'MatterMost']]
for provider_old, provider_new in providers:
c.execute('UPDATE table_settings_notifier SET name=? WHERE name=?', (provider_new, provider_old))
except:
pass
try:
c.execute('alter table table_movies add column "failedAttempts" "text"')
c.execute('alter table table_episodes add column "failedAttempts" "text"')
except:
pass
# Commit change to db
db.commit()
try:
c.execute('alter table table_episodes add column "scene_name" TEXT')
db.commit()
@ -87,13 +61,13 @@ if os.path.exists(os.path.join(config_dir, 'db/bazarr.db')) == True:
else:
from scheduler import execute_now
from get_settings import get_general_settings
integration = get_general_settings()
if integration[12] is True:
execute_now('sync_episodes')
if integration[13] is True:
execute_now('update_movies')
try:
c.execute('alter table table_episodes add column "monitored" TEXT')
db.commit()
@ -102,10 +76,11 @@ if os.path.exists(os.path.join(config_dir, 'db/bazarr.db')) == True:
else:
from scheduler import execute_now
from get_settings import get_general_settings
integration = get_general_settings()
if integration[12] is True:
execute_now('sync_episodes')
try:
c.execute('alter table table_movies add column "monitored" TEXT')
db.commit()
@ -114,8 +89,9 @@ if os.path.exists(os.path.join(config_dir, 'db/bazarr.db')) == True:
else:
from scheduler import execute_now
from get_settings import get_general_settings
integration = get_general_settings()
if integration[13] is True:
execute_now('update_movies')
db.close()

@ -32,6 +32,7 @@ from .AppriseAsset import AppriseAsset
from . import NotifyBase
from . import plugins
from . import __version__
logger = logging.getLogger(__name__)
@ -54,6 +55,9 @@ def __load_matrix():
# Get our plugin
plugin = getattr(plugins, entry)
if not hasattr(plugin, 'app_id'): # pragma: no branch
# Filter out non-notification modules
continue
# Load protocol(s) if defined
proto = getattr(plugin, 'protocol', None)
@ -277,6 +281,52 @@ class Apprise(object):
return status
def details(self):
"""
Returns the details associated with the Apprise object
"""
# general object returned
response = {
# Defines the current version of Apprise
'version': __version__,
# Lists all of the currently supported Notifications
'schemas': [],
# Includes the configured asset details
'asset': self.asset.details(),
}
# to add it's mapping to our hash table
for entry in sorted(dir(plugins)):
# Get our plugin
plugin = getattr(plugins, entry)
if not hasattr(plugin, 'app_id'): # pragma: no branch
# Filter out non-notification modules
continue
# Standard protocol(s) should be None or a tuple
protocols = getattr(plugin, 'protocol', None)
if compat_is_basestring(protocols):
protocols = (protocols, )
# Secure protocol(s) should be None or a tuple
secure_protocols = getattr(plugin, 'secure_protocol', None)
if compat_is_basestring(secure_protocols):
secure_protocols = (secure_protocols, )
# Build our response object
response['schemas'].append({
'service_name': getattr(plugin, 'service_name', None),
'service_url': getattr(plugin, 'service_url', None),
'setup_url': getattr(plugin, 'setup_url', None),
'protocols': protocols,
'secure_protocols': secure_protocols,
})
return response
def __len__(self):
"""
Returns the number of servers loaded

@ -62,12 +62,13 @@ class AppriseAsset(object):
# Image URL Mask
image_url_mask = \
'http://nuxref.com/apprise/themes/{THEME}/' \
'apprise-{TYPE}-{XY}{EXTENSION}'
'https://github.com/caronc/apprise/raw/master/apprise/assets/' \
'themes/{THEME}/apprise-{TYPE}-{XY}{EXTENSION}'
# Application Logo
image_url_logo = \
'http://nuxref.com/apprise/themes/{THEME}/apprise-logo.png'
'https://github.com/caronc/apprise/raw/master/apprise/assets/' \
'themes/{THEME}/apprise-logo.png'
# Image Path Mask
image_path_mask = abspath(join(
@ -216,6 +217,21 @@ class AppriseAsset(object):
return None
def details(self):
"""
Returns the details associated with the AppriseAsset object
"""
return {
'app_id': self.app_id,
'app_desc': self.app_desc,
'default_extension': self.default_extension,
'theme': self.theme,
'image_path_mask': self.image_url_mask,
'image_url_mask': self.image_url_mask,
'image_url_logo': self.image_url_logo,
}
@staticmethod
def hex_to_rgb(value):
"""

@ -34,7 +34,6 @@ except ImportError:
from ..utils import parse_url
from ..utils import parse_bool
from ..utils import is_hostname
from ..common import NOTIFY_IMAGE_SIZES
from ..common import NOTIFY_TYPES
from ..common import NotifyFormat
from ..common import NOTIFY_FORMATS
@ -70,7 +69,8 @@ PATHSPLIT_LIST_DELIM = re.compile(r'[ \t\r\n,\\/]+')
# Regular expression retrieved from:
# http://www.regular-expressions.info/email.html
IS_EMAIL_RE = re.compile(
r"(?P<userid>[a-z0-9$%+=_~-]+"
r"((?P<label>[^+]+)\+)?"
r"(?P<userid>[a-z0-9$%=_~-]+"
r"(?:\.[a-z0-9$%+=_~-]+)"
r"*)@(?P<domain>(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+"
r"[a-z0-9](?:[a-z0-9-]*"
@ -84,16 +84,25 @@ class NotifyBase(object):
This is the base class for all notification services
"""
# The default descriptive name associated with the Notification
service_name = None
# The services URL
service_url = None
# The default simple (insecure) protocol
# all inheriting entries must provide their protocol lookup
# protocol:// (in this example they would specify 'protocol')
protocol = ''
protocol = None
# The default secure protocol
# all inheriting entries must provide their protocol lookup
# protocols:// (in this example they would specify 'protocols')
# This value can be the same as the defined protocol.
secure_protocol = ''
secure_protocol = None
# A URL that takes you to the setup/help of the specific protocol
setup_url = None
# Most Servers do not like more then 1 request per 5 seconds, so 5.5 gives
# us a safe play range...

@ -63,9 +63,18 @@ class NotifyBoxcar(NotifyBase):
A wrapper for Boxcar Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'Boxcar'
# The services URL
service_url = 'https://boxcar.io/'
# All boxcar notifications are secure
secure_protocol = 'boxcar'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_boxcar'
# Boxcar URL
notify_url = 'https://boxcar-api.io/api/push/'

@ -49,10 +49,18 @@ class NotifyDiscord(NotifyBase):
A wrapper to Discord Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'Discord'
# The services URL
service_url = 'https://discordapp.com/'
# The default secure protocol
secure_protocol = 'discord'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_discored'
# Discord Webhook
notify_url = 'https://discordapp.com/api/webhooks'

@ -47,7 +47,7 @@ WEBBASE_LOOKUP_TABLE = (
# Google GMail
(
'Google Mail',
re.compile(r'^(?P<id>[^@]+)@(?P<domain>gmail\.com)$', re.I),
re.compile(r'^((?P<label>[^+]+)\+)?(?P<id>[^@]+)@(?P<domain>gmail\.com)$', re.I),
{
'port': 587,
'smtp_host': 'smtp.gmail.com',
@ -59,7 +59,7 @@ WEBBASE_LOOKUP_TABLE = (
# Pronto Mail
(
'Pronto Mail',
re.compile(r'^(?P<id>[^@]+)@(?P<domain>prontomail\.com)$', re.I),
re.compile(r'^((?P<label>[^+]+)\+)?(?P<id>[^@]+)@(?P<domain>prontomail\.com)$', re.I),
{
'port': 465,
'smtp_host': 'secure.emailsrvr.com',
@ -71,7 +71,7 @@ WEBBASE_LOOKUP_TABLE = (
# Microsoft Hotmail
(
'Microsoft Hotmail',
re.compile(r'^(?P<id>[^@]+)@(?P<domain>(hotmail|live)\.com)$', re.I),
re.compile(r'^((?P<label>[^+]+)\+)?(?P<id>[^@]+)@(?P<domain>(hotmail|live)\.com)$', re.I),
{
'port': 587,
'smtp_host': 'smtp.live.com',
@ -83,7 +83,7 @@ WEBBASE_LOOKUP_TABLE = (
# Yahoo Mail
(
'Yahoo Mail',
re.compile(r'^(?P<id>[^@]+)@(?P<domain>yahoo\.(ca|com))$', re.I),
re.compile(r'^((?P<label>[^+]+)\+)?(?P<id>[^@]+)@(?P<domain>yahoo\.(ca|com))$', re.I),
{
'port': 465,
'smtp_host': 'smtp.mail.yahoo.com',
@ -95,7 +95,7 @@ WEBBASE_LOOKUP_TABLE = (
# Catch All
(
'Custom',
re.compile(r'^(?P<id>[^@]+)@(?P<domain>.+)$', re.I),
re.compile(r'^((?P<label>[^+]+)\+)?(?P<id>[^@]+)@(?P<domain>.+)$', re.I),
{
# Setting smtp_host to None is a way of
# auto-detecting it based on other parameters
@ -113,12 +113,18 @@ class NotifyEmail(NotifyBase):
"""
# The default descriptive name associated with the Notification
service_name = 'E-Mail'
# The default simple (insecure) protocol
protocol = 'mailto'
# The default secure protocol
secure_protocol = 'mailtos'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_email'
# Default Non-Encryption Port
default_port = 25

@ -37,6 +37,11 @@ class NotifyEmby(NotifyBase):
"""
A wrapper for Emby Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'Emby'
# The services URL
service_url = 'https://emby.media/'
# The default protocol
protocol = 'emby'
@ -44,6 +49,9 @@ class NotifyEmby(NotifyBase):
# The default secure protocol
secure_protocol = 'embys'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_emby'
# Emby uses the http protocol with JSON requests
emby_default_port = 8096

@ -28,9 +28,18 @@ class NotifyFaast(NotifyBase):
A wrapper for Faast Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'Faast'
# The services URL
service_url = 'http://www.faast.io/'
# The default protocol (this is secure for faast)
protocol = 'faast'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_faast'
# Faast uses the http protocol with JSON requests
notify_url = 'https://www.appnotifications.com/account/notifications.json'

@ -50,9 +50,18 @@ class NotifyGrowl(NotifyBase):
"""
# The default descriptive name associated with the Notification
service_name = 'Growl'
# The services URL
service_url = 'http://growl.info/'
# The default protocol
protocol = 'growl'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_growl'
# Default Growl Port
default_port = 23053

@ -43,6 +43,18 @@ class NotifyIFTTT(NotifyBase):
"""
# The default descriptive name associated with the Notification
service_name = 'IFTTT'
# The services URL
service_url = 'https://ifttt.com/'
# The default protocol
protocol = 'ifttt'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_ifttt'
# Even though you'll add 'Ingredients' as {{ Value1 }} to your Applets,
# you must use their lowercase value in the HTTP POST.
ifttt_default_key_prefix = 'value'
@ -65,9 +77,6 @@ class NotifyIFTTT(NotifyBase):
# value1, value2, and value3).
ifttt_default_type_key = 'value3'
# The default protocol
protocol = 'ifttt'
# IFTTT uses the http protocol with JSON requests
notify_url = 'https://maker.ifttt.com/trigger/{event}/with/key/{apikey}'

@ -30,12 +30,18 @@ class NotifyJSON(NotifyBase):
A wrapper for JSON Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'JSON'
# The default protocol
protocol = 'json'
# The default secure protocol
secure_protocol = 'jsons'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_Custom_JSON'
# Allows the user to specify the NotifyImageSize object
image_size = NotifyImageSize.XY_128

@ -64,9 +64,18 @@ class NotifyJoin(NotifyBase):
A wrapper for Join Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'Join'
# The services URL
service_url = 'https://joaoapps.com/join/'
# The default protocol
protocol = 'join'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_join'
# Join uses the http protocol with JSON requests
notify_url = \
'https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush'

@ -37,12 +37,21 @@ class NotifyMatterMost(NotifyBase):
A wrapper for MatterMost Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'MatterMost'
# The services URL
service_url = 'https://mattermost.com/'
# The default protocol
protocol = 'mmost'
# The default secure protocol
secure_protocol = 'mmosts'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_mattermost'
# The default Mattermost port
default_port = 8065

@ -59,9 +59,18 @@ class NotifyProwl(NotifyBase):
A wrapper for Prowl Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'Prowl'
# The services URL
service_url = 'https://www.prowlapp.com/'
# The default secure protocol
secure_protocol = 'prowl'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_prowl'
# Prowl uses the http protocol with JSON requests
notify_url = 'https://api.prowlapp.com/publicapi/add'

@ -45,9 +45,18 @@ class NotifyPushBullet(NotifyBase):
A wrapper for PushBullet Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'Pushbullet'
# The services URL
service_url = 'https://www.pushbullet.com/'
# The default secure protocol
secure_protocol = 'pbul'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_pushbullet'
# PushBullet uses the http protocol with JSON requests
notify_url = 'https://api.pushbullet.com/v2/pushes'

@ -40,9 +40,18 @@ class NotifyPushalot(NotifyBase):
A wrapper for Pushalot Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'Pushalot'
# The services URL
service_url = 'https://pushalot.com/'
# The default protocol is always secured
secure_protocol = 'palot'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_pushalot'
# Pushalot uses the http protocol with JSON requests
notify_url = 'https://pushalot.com/api/sendmessage'

@ -32,12 +32,21 @@ class NotifyPushjet(NotifyBase):
A wrapper for Pushjet Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'Pushjet'
# The services URL
service_url = 'https://pushjet.io/'
# The default protocol
protocol = 'pjet'
# The default secure protocol
secure_protocol = 'pjets'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_pushjet'
def __init__(self, **kwargs):
"""
Initialize Pushjet Object

@ -68,9 +68,18 @@ class NotifyPushover(NotifyBase):
A wrapper for Pushover Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'Pushover'
# The services URL
service_url = 'https://pushover.net/'
# All pushover requests are secure
secure_protocol = 'pover'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_pushover'
# Pushover uses the http protocol with JSON requests
notify_url = 'https://api.pushover.net/1/messages.json'

@ -44,12 +44,21 @@ class NotifyRocketChat(NotifyBase):
A wrapper for Notify Rocket.Chat Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'Rocket.Chat'
# The services URL
service_url = 'https://rocket.chat/'
# The default protocol
protocol = 'rocket'
# The default secure protocol
secure_protocol = 'rockets'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_rocketchat'
# Defines the maximum allowable characters in the title
title_maxlen = 200

@ -71,9 +71,18 @@ class NotifySlack(NotifyBase):
A wrapper for Slack Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'Slack'
# The services URL
service_url = 'https://slack.com/'
# The default secure protocol
secure_protocol = 'slack'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_slack'
# Slack uses the http protocol with JSON requests
notify_url = 'https://hooks.slack.com/services'

@ -61,10 +61,18 @@ class NotifyStride(NotifyBase):
A wrapper to Stride Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'Stride'
# The services URL
service_url = 'https://www.stride.com/'
# The default secure protocol
secure_protocol = 'stride'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_stride'
# Stride Webhook
notify_url = 'https://api.atlassian.com/site/{cloud_id}/' \
'conversation/{convo_id}/message'

@ -81,10 +81,18 @@ class NotifyTelegram(NotifyBase):
"""
A wrapper for Telegram Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'Telegram'
# The services URL
service_url = 'https://telegram.org/'
# The default secure protocol
secure_protocol = 'tgram'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_telegram'
# Telegram uses the http protocol with JSON requests
notify_url = 'https://api.telegram.org/bot'

@ -34,9 +34,18 @@ class NotifyToasty(NotifyBase):
A wrapper for Toasty Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'Toasty'
# The services URL
service_url = 'http://supertoasty.com/'
# The default protocol
protocol = 'toasty'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_toasty'
# Toasty uses the http protocol with JSON requests
notify_url = 'http://api.supertoasty.com/notify/'

@ -26,9 +26,18 @@ class NotifyTwitter(NotifyBase):
"""
# The default descriptive name associated with the Notification
service_name = 'Twitter'
# The services URL
service_url = 'https://twitter.com/'
# The default secure protocol
secure_protocol = 'tweet'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_twitter'
# The maximum allowable characters allowed in the body per message
# This is used during a Private DM Message Size (not Public Tweets
# which are limited to 240 characters)

@ -47,9 +47,15 @@ class NotifyWindows(NotifyBase):
A wrapper for local Windows Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'Windows Notification'
# The default protocol
protocol = 'windows'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_windows'
# Allows the user to specify the NotifyImageSize object
image_size = NotifyImageSize.XY_128

@ -31,12 +31,21 @@ class NotifyXBMC(NotifyBase):
A wrapper for XBMC/KODI Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'Kodi/XBMC'
# The services URL
service_url = 'http://kodi.tv/'
# The default protocols
protocol = ('xbmc', 'kodi')
# The default secure protocols
secure_protocol = ('xbmc', 'kodis')
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_kodi'
# XBMC uses the http protocol with JSON requests
xbmc_default_port = 8080

@ -30,12 +30,18 @@ class NotifyXML(NotifyBase):
A wrapper for XML Notifications
"""
# The default descriptive name associated with the Notification
service_name = 'XML'
# The default protocol
protocol = 'xml'
# The default secure protocol
secure_protocol = 'xmls'
# A URL that takes you to the setup/help of the specific protocol
setup_url = 'https://github.com/caronc/apprise/wiki/Notify_Custom_XML'
# Allows the user to specify the NotifyImageSize object
image_size = NotifyImageSize.XY_128

@ -1,4 +1,4 @@
apprise=0.0.9
apprise=0.5.2
apscheduler=3.5.1
babelfish=0.5.5
backports.functools-lru-cache=1.5
@ -6,12 +6,11 @@ Beaker=1.10.0
bottle=0.12.13
bottle-fdsend=0.1.1
chardet=3.0.4
cherrypy=8.9.1 <-- Never update
configparser=3.5.0
dogpile.cache=0.6.5
enzyme=0.4.1
gitpython=2.1.9
guessit=3.0.0
guessit=2.1.4
langdetect=1.0.7
py-pretty=1
pycountry=18.2.23

Loading…
Cancel
Save