|
1 |
| -__Note:__ This script was originally written to be an [NZBGet](https://nzbget.net) _post-processing_ script notifying you of retrieved content through a variety of different notification services. But will work for SABnzbd users (starting at v1.1.0+) as well. The script additionally works fine as standalone tool for anyone else too! See the _Command Line_ section below for details how you can easily use this on it's own (without NZBGet). |
2 |
| - |
3 |
| -SABnzbd users can reference sabnzbd-notify.py to gain support of the tool as well. |
| 1 | +## Notify Processing Script |
4 | 2 |
|
5 | 3 | [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MHANV39UZNQ5E)
|
6 | 4 |
|
| 5 | +Send notifications to all of the popular notification services (PushBullet, NotifyMyAndroid, XBMC, Email etc) from NZBGet or SABnzbd. |
| 6 | +You can chain as many notification services as you want and support most of the advance features each service offers you too. |
| 7 | +You can even run the tool from the command line for your own custom use. |
| 8 | + |
7 | 9 | ## Built on Apprise
|
8 | 10 |
|
9 | 11 | This guts of this script have been recently extracted into it's own project called [Apprise](https://github.com/caronc/apprise) which allows others to build Notifications into their applications as well.
|
| 12 | +Apprise was written in such a way that there wouldn't be a lot of effort to add more notification services either. Feel free to contact me if one you would like to use is missing. |
10 | 13 |
|
11 |
| -## Notify Processing Script |
12 |
| - |
13 |
| -Send notifications to all of the popular notification services (PushBullet, NotifyMyAndroid, XBMC, Email etc). NZBGet (and/or SABnzbd) will automatically notify you of anything it downloads. You can chain as many notification services as you want and support most of the advance features each service offers you too. |
| 14 | +## Supported Notifications |
14 | 15 |
|
15 |
| -You can even run the tool from the command line for your own custom use. Notify.py was written in such a way that there wouldn't be a lot of effort to add more notification services either. Feel free to contact me if one you would like to use is missing. |
| 16 | +For a complete list of supported notification services and examples on how to build their URLs [click here](https://github.com/caronc/apprise/wiki#notification-services). |
16 | 17 |
|
17 |
| -## Installation Instructions |
| 18 | +## Installation and usage instructions |
18 | 19 |
|
19 | 20 | 1. Ensure you have Python v2.7 or later installed onto your system.
|
20 | 21 | ```bash
|
21 | 22 | # Pull in dependencies:
|
22 | 23 | pip install -r requirements.txt
|
23 | 24 | ```
|
24 |
| -2. Simply place the __Notify.py__ and __Notify__ directory together. |
| 25 | +2. Simply place the `Notify.py` and `Notify` directory together. |
25 | 26 | * __NZBGet users__: you'll want to place these inside of your _nzbget/scripts_ directory. Please ensure you are running _(at least)_ NZBGet v11.0 or higher. You can acquire the latest version of of it from [here](https://nzbget.net/download).
|
26 | 27 | * __NZBGet users__: As one additional note; this script makes use of the RPC feature of NZBGet in order to retrive all of the status information it will notify you with. Its very important that this is configured correctly (in the 'Settings -> Security' area). The out of the box settings should work fine; but worth noting here should experience any issues.
|
27 |
| - * __SABnzbd users__: You'll point your SABnzbd configuration to reference sabnzbd-notify.py via the _Script_ entry and _not_ Notify.py. However, please note that the Notify.py script is still required (as sabnzbd-notify.py is a wrapper to it). You will use the _Parameters_ section to provide the services you wish to notify (see below how they are constructed). |
| 28 | + * __SABnzbd users__: You'll point your SABnzbd configuration to reference `sabnzbd-notify.py` via the _Script_ entry and _not_ `Notify.py`. However, please note that the `Notify.py` script is still required (as `sabnzbd-notify.py` is a wrapper to it). You will use the _Parameters_ section to provide the services you wish to notify (see below how they are constructed). |
28 | 29 |
|
29 |
| -The Non-NZBGet/SABnzbd users can also use this script from the command line. |
30 |
| -See the __Command Line__ section below for more instructions on how to do this. |
| 30 | +See the __Command Line__ section below for more instructions on how to call the script from the command line. |
31 | 31 |
|
32 |
| -## Supported Notifications |
| 32 | +## SABnzbd Users |
| 33 | +SABnzbd users can test that their script is working okay manually as well if they're having issues with it through their application. This is also a great way to test out that you've created the correct URL string. |
| 34 | +```bash |
| 35 | +# Send a notification to XBMC (assuming its listening on |
| 36 | +# port 8080 at the ip 192.168.0.2 with respect to the example |
| 37 | +# below: |
| 38 | +python sabnzbd-notify.py complete 'Hello' 'World' xbmc://192.168.0.2 |
| 39 | +``` |
| 40 | +The syntax is very similar except SABnzbd expects 4 distinct arguments. |
| 41 | + |
| 42 | +| Arg # | Description | |
| 43 | +| ----- |:----------- | |
| 44 | +| 1 | The type of notification we are sending. This has an impact on the icon (for those that support it) that you will pass along with the message. |
| 45 | +| 2 | The title of the notification message. If this is an empty string, then there is enough information based on the notification type you passed in (argument 1) to generate a title. | |
| 46 | +| 3 | The message body. | |
| 47 | +| 4 | Comma delimited URL strings just like the ones already discussed above. |
33 | 48 |
|
34 |
| -**For a complete list of supported notification services and examples on how to build their URLs [click here](https://github.com/caronc/apprise/wiki#notification-services)**. |
| 49 | +### SABnzbd Configuration |
| 50 | +First, make sure you've placed `sabnzb-notify.py`, `Notify.py`, and the `Notify` directory inside of the `/path/to/SABnzbd/scripts/` directory or the instructions below will not work. |
| 51 | + |
| 52 | +Once you know the _URL_(s) that work for you, you can set SABnzbd to automatically notify setting it up as follows. From within SABnzbd's web interface: |
| 53 | + |
| 54 | +- Click on __Settings__ |
| 55 | +- Click on __Notifications__ |
| 56 | +- Place a checkbox in the __Enable notification script__ option. |
| 57 | +- Choose `sabnzb-notify.py` from the Script dropdown menu. |
| 58 | +- Specify the URL such as `kodi://192.168.0.2` in the _Parameters_ section. You can specify more then one URL here by simply using a _comma_ (`,`) as a delimiter. |
| 59 | + |
| 60 | +CentOS/RedHat users can also refer to a [blog entry I prepared](https://nuxref.com/2016/10/20/sabnzbd-installation-centos-7/) for this which includes RPM packaging for both [SABnzbd](https://repo.nuxref.com/centos/7/en/x86_64/custom/repoview/sabnzbd.html) and [NZB-Notify](https://repo.nuxref.com/centos/7/en/x86_64/custom/repoview/sabnzbd-script-notify.html). These can be easily installed (with all required dependencies by just getting yourself set up with my repository [here](https://nuxref.com/nuxref-repository/). |
35 | 61 |
|
36 | 62 | ## Command Line
|
37 | 63 |
|
38 |
| -**Notify.py** has a built in command line interface that can be easily tied |
| 64 | +`Notify.py` has a built in command line interface that can be easily tied |
39 | 65 | to a cron entry or can be easily called from the command line to automate
|
40 | 66 | the fetching of subtitles.
|
41 | 67 |
|
@@ -83,35 +109,5 @@ python Notify.py \
|
83 | 109 | -t "Hello" -b "World!"
|
84 | 110 | ```
|
85 | 111 |
|
86 |
| -## SABnzbd Users |
87 |
| -SABnzbd users can test that their script is working okay manually as well if they're having issues with it through their application. This is also a great way to test out that you've created the correct URL string. |
88 |
| -```bash |
89 |
| -# Send a notification to XBMC (assuming its listening on |
90 |
| -# port 8080 at the ip 192.168.0.2 with respect to the example |
91 |
| -# below: |
92 |
| -python sabnzbd-notify.py complete 'Hello' 'World' xbmc://192.168.0.2 |
93 |
| -``` |
94 |
| -The syntax is very similar except SABnzbd expects 4 distinct arguments. |
95 |
| - |
96 |
| -| Arg # | Description | |
97 |
| -| ----- |:----------- | |
98 |
| -| 1 | The type of notification we are sending. This has an impact on the icon (for those that support it) that you will pass along with the message. |
99 |
| -| 2 | The title of the notification message. If this is an empty string, then there is enough information based on the notification type you passed in (argument 1) to generate a title. | |
100 |
| -| 3 | The message body. | |
101 |
| -| 4 | Comma delimited URL strings just like the ones already discussed above. |
102 |
| - |
103 |
| -### SABnzbd Configuration |
104 |
| -First, make sure you've placed __sabnzb-notify.py__, __Notify.py__, and the __Notify__ inside of the _/path/to/SABnzbd/scripts/_ directory or the instructions below will not work. |
105 |
| - |
106 |
| -Once you know the _URL_(s) that work for you, you can set SABnzbd to automatically notify setting it up as follows. From within SABnzbd's web interface: |
107 |
| - |
108 |
| -- Click on __Settings__ |
109 |
| -- Click on __Notifications__ |
110 |
| -- Place a checkbox in the __Enable notification script__ option. |
111 |
| -- Choose __sabnzb-notify.py__ from the Script dropdown menu. |
112 |
| -- Specify the URL such as kodi://192.168.0.2 in the _Parameters_ section. You can specify more then one URL here by simply using a _comma_ (,) as a delimiter. |
113 |
| - |
114 |
| -CentOS/RedHat users can also refer to a [blog entry I prepared](https://nuxref.com/2016/10/20/sabnzbd-installation-centos-7/) for this which includes RPM packaging for both [SABnzbd](https://repo.nuxref.com/centos/7/en/x86_64/custom/repoview/sabnzbd.html) and [NZB-Notify](https://repo.nuxref.com/centos/7/en/x86_64/custom/repoview/sabnzbd-script-notify.html). These can be easily installed (with all required dependencies by just getting yourself set up with my repository [here](https://nuxref.com/nuxref-repository/). |
115 |
| - |
116 | 112 | ## Donations
|
117 | 113 | If you like this script and feel like donating, you can do so through either [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MHANV39UZNQ5E) or [sponsor me](https://github.com/sponsors/caronc)! Thank you so much to everyone who has donated in the past!
|
0 commit comments