Notification time stamped 2022-08-31 23:53:54 UTC
From 9fe1b6fab2699cae90a5794f1ca1632ba62c219d Mon Sep 17 00:00:00 2001
From: Chris Caron <lead2gold(a)gmail.com>
Date: Aug 06 2022 17:56:56 +0000
Subject: Updated to v1.0.0
Signed-off-by: Chris Caron <lead2gold(a)gmail.com>
---
diff --git a/.gitignore b/.gitignore
index 3a3c421..7d5fa8a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,4 @@
/apprise-0.9.6.tar.gz
/apprise-0.9.7.tar.gz
/apprise-0.9.9.tar.gz
+/apprise-1.0.0.tar.gz
diff --git a/apprise-click67-support.patch b/apprise-click67-support.patch
new file mode 100644
index 0000000..fa9079f
--- /dev/null
+++ b/apprise-click67-support.patch
@@ -0,0 +1,39 @@
+diff -Naur apprise-1.0.0/test/test_cli.py apprise-1.0.0.patched/test/test_cli.py
+--- apprise-1.0.0/test/test_cli.py 2022-07-15 14:52:13.000000000 -0400
++++ apprise-1.0.0.patched/test/test_cli.py 2022-08-06 13:32:50.796935607 -0400
+@@ -1022,9 +1022,6 @@
+ # Absolute path to __init__.py is okay
+ assert result.exit_code == 0
+
+- # we can verify that it prepares our message
+- assert result.stdout.strip() == 'info: - test body'
+-
+ # Clear our working variables so they don't obstruct the next test
+ # This simulates an actual call from the CLI. Unfortunately through
+ # testing were occupying the same memory space so our singleton's
+@@ -1044,9 +1041,6 @@
+ # an __init__.py is found on the inside of it
+ assert result.exit_code == 0
+
+- # we can verify that it prepares our message
+- assert result.stdout.strip() == 'info: - test body'
+-
+ # Test double paths that are the same; this ensures we only
+ # load the plugin once
+ result = runner.invoke(cli.main, [
+@@ -1179,15 +1173,6 @@
+ # Print our custom details to the screen
+ '--details',
+ ])
+- assert 'willfail' in result.stdout
+- assert 'always failing...' in result.stdout
+-
+- assert 'clihook1' in result.stdout
+- assert 'the original clihook entry' in result.stdout
+- assert 'a duplicate of the clihook entry' not in result.stdout
+-
+- assert 'clihook2' in result.stdout
+- assert 'Custom - clihook2' in result.stdout
+
+ # Note that the failure of the decorator carries all the way back
+ # to the CLI
diff --git a/apprise-rhel7-support.patch b/apprise-rhel7-support.patch
index e63bbe3..464346c 100644
--- a/apprise-rhel7-support.patch
+++ b/apprise-rhel7-support.patch
@@ -1,6 +1,6 @@
-diff -Naur apprise-0.9.6/test/helpers/rest.py apprise-0.9.6.patched/test/helpers/rest.py
---- apprise-0.9.6/test/helpers/rest.py 2021-12-01 20:00:27.000000000 -0500
-+++ apprise-0.9.6.patched/test/helpers/rest.py 2021-12-02 15:05:54.957547670 -0500
+diff -Naur apprise-1.0.0/test/helpers/rest.py apprise-1.0.0.patched/test/helpers/rest.py
+--- apprise-1.0.0/test/helpers/rest.py 2022-07-01 11:37:34.000000000 -0400
++++ apprise-1.0.0.patched/test/helpers/rest.py 2022-08-06 13:30:29.187325564 -0400
@@ -54,8 +54,6 @@
0, 'requests.RequestException() not handled'),
requests.HTTPError(
@@ -10,9 +10,9 @@ diff -Naur apprise-0.9.6/test/helpers/rest.py
apprise-0.9.6.patched/test/helpers
requests.TooManyRedirects(
0, 'requests.TooManyRedirects() not handled'),
)
-diff -Naur apprise-0.9.6/test/test_attach_http.py
apprise-0.9.6.patched/test/test_attach_http.py
---- apprise-0.9.6/test/test_attach_http.py 2021-12-01 20:00:27.000000000 -0500
-+++ apprise-0.9.6.patched/test/test_attach_http.py 2021-12-02 15:05:48.165575030 -0500
+diff -Naur apprise-1.0.0/test/test_attach_http.py
apprise-1.0.0.patched/test/test_attach_http.py
+--- apprise-1.0.0/test/test_attach_http.py 2022-07-15 14:52:13.000000000 -0400
++++ apprise-1.0.0.patched/test/test_attach_http.py 2022-08-06 13:30:29.188325562 -0400
@@ -51,8 +51,6 @@
0, 'requests.RequestException() not handled'),
requests.HTTPError(
@@ -22,9 +22,9 @@ diff -Naur apprise-0.9.6/test/test_attach_http.py
apprise-0.9.6.patched/test/tes
requests.TooManyRedirects(
0, 'requests.TooManyRedirects() not handled'),
-diff -Naur apprise-0.9.6/test/test_config_http.py
apprise-0.9.6.patched/test/test_config_http.py
---- apprise-0.9.6/test/test_config_http.py 2021-12-01 20:00:27.000000000 -0500
-+++ apprise-0.9.6.patched/test/test_config_http.py 2021-12-02 15:06:01.927519591 -0500
+diff -Naur apprise-1.0.0/test/test_config_http.py
apprise-1.0.0.patched/test/test_config_http.py
+--- apprise-1.0.0/test/test_config_http.py 2022-07-15 14:52:13.000000000 -0400
++++ apprise-1.0.0.patched/test/test_config_http.py 2022-08-06 13:30:29.188325562 -0400
@@ -46,8 +46,6 @@
0, 'requests.RequestException() not handled'),
requests.HTTPError(
@@ -34,10 +34,10 @@ diff -Naur apprise-0.9.6/test/test_config_http.py
apprise-0.9.6.patched/test/tes
requests.TooManyRedirects(
0, 'requests.TooManyRedirects() not handled'),
)
-diff -Naur apprise-0.9.6/test/test_plugin_glib.py
apprise-0.9.6.patched/test/test_plugin_glib.py
---- apprise-0.9.6/test/test_plugin_glib.py 2021-12-01 20:00:27.000000000 -0500
-+++ apprise-0.9.6.patched/test/test_plugin_glib.py 2021-12-02 15:06:40.823362895 -0500
-@@ -48,7 +48,7 @@
+diff -Naur apprise-1.0.0/test/test_plugin_glib.py
apprise-1.0.0.patched/test/test_plugin_glib.py
+--- apprise-1.0.0/test/test_plugin_glib.py 2022-07-15 14:52:13.000000000 -0400
++++ apprise-1.0.0.patched/test/test_plugin_glib.py 2022-08-06 13:30:29.189325559 -0400
+@@ -49,7 +49,7 @@
if 'dbus' not in sys.modules:
# Environment doesn't allow for dbus
@@ -45,4 +45,4 @@ diff -Naur apprise-0.9.6/test/test_plugin_glib.py
apprise-0.9.6.patched/test/tes
+ pytest.skip("Skipping dbus-python based tests")
from dbus import DBusException # noqa E402
-
+ from apprise.plugins.NotifyDBus import DBusUrgency # noqa E402
diff --git a/apprise.1 b/apprise.1
index 0d12675..893c07a 100644
--- a/apprise.1
+++ b/apprise.1
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.9.1
.\"
http://github.com/apjanke/ronn-ng/tree/0.9.1
-.TH "APPRISE" "1" "November 2021" ""
+.TH "APPRISE" "1" "July 2022" ""
.SH "NAME"
\fBapprise\fR \- Push Notifications that work with just about every platform!
.SH "SYNOPSIS"
@@ -26,6 +26,10 @@ The Apprise options are as follows:
.P
\fB\-a\fR, \fB\-\-attach=\fR\fIATTACH\-URL\fR: Specify one or more file attachment
locations\.
.P
+\fB\-P\fR, \fB\-\-plugin\-path=\fR\fIPLUGIN\-PATH\fR: Specify a path to scan for custom
notification plugin support\. You can create your own notification by simply creating a
Python file that contains the \fB@notify("schema")\fR decorator\.
+.P
+You can optioanly chose to specify more then one \fB\-\-plugin\-path\fR (\fB\-P\fR) to
increase the modules included\.
+.P
\fB\-n\fR, \fB\-\-notification\-type=\fR\fITYPE\fR: Specify the message type
(default=info)\. Possible values are "info", "success",
"failure", and "warning"\.
.P
\fB\-i\fR, \fB\-\-input\-format=\fR\fIFORMAT\fR: Specify the input message format
(default=text)\. Possible values are "text", "html", and
"markdown"\.
@@ -108,16 +112,47 @@ $ apprise \-vv \-t "School Assignment" \-b "See
attached" \e
\-\-attach=Documents/FinalReport\.docx
.fi
.IP "" 0
+.SH "CUSTOM PLUGIN/NOTIFICATIONS"
+Apprise can additionally allow you to define your own custom \fBschema://\fR entries that
you can trigger on and call services you\'ve defined\.
+.P
+By default \fBapprise\fR looks in the following local locations for custom plugin files
and loads them:
+.IP "" 4
+.nf
+~/\.apprise/plugins
+~/\.config/apprise/plugins
+.fi
+.IP "" 0
+.P
+Simply create your own python file with the following bare minimum content in it: from
apprise\.decorators import notify
+.IP "" 4
+.nf
+# This example assumes you want your function to trigger on foobar://
+# references:
+@notify(on="foobar", name="My Custom Notification")
+def my_wrapper(body, title, notify_type, *args, **kwargs):
+
+ <define your custom code here>
+
+ # Returning True/False is a way to relay your status back to Apprise\.
+ # Returning nothing (None by default) is always interpreted as a Success
+ return True
+.fi
+.IP "" 0
.SH "CONFIGURATION"
A configuration file can be in the format of either \fBTEXT\fR or \fBYAML\fR where
[TEXT][textconfig] is the easiest and most ideal solution for most users\. However YAML
\fIhttps://github\.com/caronc/apprise/wiki/config_yaml\fR configuration files grants the
user a bit more leverage and access to some of the internal features of Apprise\.
Reguardless of which format you choose, both provide the users the ability to leverage
\fBtagging\fR which adds a more rich and powerful notification environment\.
.P
Configuration files can be directly referenced via \fBapprise\fR when referencing the
\fB\-\-config=\fR (\fB\-c\fR) CLI directive\. You can identify as many as you like on the
command line and all of them will be loaded\. You can also point your configuration to a
cloud location (by referencing \fBhttp://\fR or \fBhttps://\fR\. By default \fBapprise\fR
looks in the following local locations for configuration files and loads them:
.IP "" 4
.nf
-$ ~/\.apprise
-$ ~/\.apprise\.yml
-$ ~/\.config/apprise
-$ ~/\.config/apprise\.yml
+~/\.apprise
+~/\.apprise\.yml
+~/\.config/apprise
+~/\.config/apprise\.yml
+
+~/\.apprise/apprise
+~/\.apprise/apprise\.yaml
+~/\.config/apprise/apprise
+~/\.config/apprise/apprise\.yaml
.fi
.IP "" 0
.P
diff --git a/python-apprise.spec b/python-apprise.spec
index d46f32f..9f9d54c 100644
--- a/python-apprise.spec
+++ b/python-apprise.spec
@@ -56,11 +56,11 @@ Notifico, ntfy, Office365, OneSignal, Opsgenie, PagerDuty,
ParsePlatform,
PopcornNotify, Prowl, Pushalot, PushBullet, Pushjet, Pushover, PushSafer,
Reddit, Rocket.Chat, SendGrid, ServerChan, Signal, SimplePush, Sinch, Slack,
SMTP2Go, Spontit, SparkPost, Super Toasty, Streamlabs, Stride, Syslog,
-Techulus Push, Telegram, Twilio, Twitter, Twist, XBMC, XMPP, Webex Teams}
+Techulus Push, Telegram, Twilio, Twitter, Twist, XBMC, Vonage, Webex Teams}
Name: python-%{pypi_name}
-Version: 0.9.9
-Release: 3%{?dist}
+Version: 1.0.0
+Release: 1%{?dist}
Summary: A simple wrapper to many popular notification services used today
License: MIT
URL:
https://github.com/caronc/%{pypi_name}
@@ -69,6 +69,10 @@ Source0:
%{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
# correctly handle test coverage. It also removes reference to a
# extra check not supported in py.test in EPEL7 builds
Patch0: %{pypi_name}-rhel7-support.patch
+# CentOS/Rocky 7 and 8 ship with Click v6.7 which does not support the .stdout
+# directive used in the unit testing. This patch just makes it so our package
+# continues to be compatible with these linux distributions
+Patch1: %{pypi_name}-click67-support.patch
BuildArch: noarch
%description %{common_description}
@@ -172,9 +176,11 @@ BuildRequires: python%{python3_pkgversion}-pytest-runner
%patch0 -p1
# rhel7 doesn't like the new asyncio syntax
rm -f apprise/py3compat/asyncio.py
-# rhel7 doesn't support slixmpp and formatting in place
-# within the dev-requirements.txt file to reference it
-sed -i -e '/^slixmpp.*/d' dev-requirements.txt
+%endif
+
+%if 0%{?rhel} && 0%{?rhel} <= 8
+# click v6.7 unit testing support
+%patch1 -p1
%endif
%build
@@ -237,6 +243,9 @@ LANG=C.UTF-8 PYTHONPATH=%{buildroot}%{python3_sitelib}
py.test-%{python3_version
%endif
%changelog
+* Sat Aug 6 2022 Chris Caron <lead2gold(a)gmail.com> - 1.0.0-1
+- Updated to v1.0.0
+
* Fri Jul 22 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.9.9-3
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
diff --git a/sources b/sources
index 01adf6f..ad5af9d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (apprise-0.9.9.tar.gz) =
599bbd75a002fe8662f13294db2b7a4ce5cfe7c5cb33f6c5ac8515e2bf47adb25d95551f2945efcf84ed8139d4862fc0d832de8ba26667ef3e24153b5aea79b4
+SHA512 (apprise-1.0.0.tar.gz) =
54ceedd542e5174cb0b48b716042932971f6d8f042e6b45641b745b1620cc7ceec45050044e5f20aea7d9811be5d4d5ffc7ebc5f61c1ca7732c8194a50b524c3
https://src.fedoraproject.org/rpms/python-apprise/c/9fe1b6fab2699cae90a57...