Code: Select all
Thu Aug 10 13:05:12 2017 INFO Executing script Notify.py with command TestServers
Thu Aug 10 13:05:13 2017 INFO Notify: [DEBUG] get(config) SERVERS="slack://RedactedTokenA/RedactedTokenB/RedactedTokenC/#notifications"
Thu Aug 10 13:05:13 2017 INFO Notify: [DEBUG] get(default) TITLE=None
Thu Aug 10 13:05:13 2017 INFO Notify: [DEBUG] get(default) BODY=None
Thu Aug 10 13:05:13 2017 INFO Notify: [DEBUG] get(config) INCLUDEIMAGE="yes"
Thu Aug 10 13:05:13 2017 INFO Notify: [DEBUG] get(config) SERVERS="slack://RedactedTokenA/RedactedTokenB/RedactedTokenC/#notifications"
Thu Aug 10 13:05:13 2017 INFO Notify: [DEBUG] get(config) ONFAILURE="yes"
Thu Aug 10 13:05:13 2017 INFO Notify: [DEBUG] get(config) ONSUCCESS="yes"
Thu Aug 10 13:05:13 2017 INFO Notify: [DEBUG] get(config) INCLUDESTATS="yes"
Thu Aug 10 13:05:13 2017 INFO Notify: [DEBUG] get(config) INCLUDEFILES="yes"
Thu Aug 10 13:05:13 2017 INFO Notify: [DEBUG] get(config) INCLUDELOGS="OnFailure"
Thu Aug 10 13:05:13 2017 INFO Notify: [DEBUG] get(config) INCLUDEIMAGE="yes"
Thu Aug 10 13:05:13 2017 INFO Notify: [DEBUG] Server parsed to: {'host': 'RedactedTokenA', 'user': None, 'query': '%23notifications', 'url': 'slack://RedactedTokenA/RedactedTokenB/RedactedTokenC/%23notifications', 'path': '/RedactedTokenB/RedactedTokenC/', 'fullpath': '/RedactedTokenB/RedactedTokenC/%23notifications', 'password': None, 'port': None, 'qsd': {}, 'schema': 'slack'}
Thu Aug 10 13:05:13 2017 WARNING Notify: No user was specified; using NZB-Notify.
Thu Aug 10 13:05:13 2017 INFO Notify: [DEBUG] Slack POST URL: https://hooks.slack.com/services/RedactedTokenA/RedactedTokenB/RedactedTokenC (cert_verify=True)
Thu Aug 10 13:05:13 2017 INFO Notify: [DEBUG] Slack Payload: {'username': 'NZB-Notify', 'mrkdwn': True, 'channel': '#notifications', 'attachments': [{'footer': 'NZB-Notify', 'color': '#3AA3E3', 'text': '## NZBGet-Notify Configuration Test ##\r\n- **OnFailure**: Yes\r\n- **OnSuccess**: Yes\r\n- **Include Statistics**: Yes\r\n- **Include File Listings**: Yes\r\n- **Include Log Details**: Yes\r\n', 'title': 'NZBGet-Notify Configuration Test', 'ts': 1502384713.785524, 'footer_icon': 'http://yes'}]}
Thu Aug 10 13:05:14 2017 WARNING Notify: A Connection error occured sending Slack:notifications notification.
Thu Aug 10 13:05:14 2017 INFO Notify: [DEBUG] Socket Exception: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
Thu Aug 10 13:05:14 2017 INFO Notify: [DEBUG] Exiting with return code: 93
Thu Aug 10 13:05:14 2017 INFO Script Notify.py with command TestServers successful
Code: Select all
[/share/CACHEDEV1_DATA/.qpkg/NZBGet/nzbget/scripts] # python Notify.py -s slack://Redacted TokenA/RedactedTokenB/RedactedTokenC/#notifications -t "Test" -b "Test Msg" -D
[INFO] [DEBUG] Script mode forced off.
2017-08-10 13:18:37,959 - 21480 - DEBUG - get(default) SERVERS=None
2017-08-10 13:18:37,959 - 21480 - DEBUG - set(config) SERVERS="slack://Redacted TokenA/RedactedTokenB/RedactedTokenC/#notifications"
2017-08-10 13:18:37,959 - 21480 - DEBUG - set(environment) SERVERS="slack://Redacted TokenA/RedactedTokenB/RedactedTokenC/#notifications"
2017-08-10 13:18:37,959 - 21480 - DEBUG - get(default) TITLE=None
2017-08-10 13:18:37,959 - 21480 - DEBUG - set(config) TITLE="Test"
2017-08-10 13:18:37,960 - 21480 - DEBUG - set(environment) TITLE="Test"
2017-08-10 13:18:37,960 - 21480 - DEBUG - get(default) BODY=None
2017-08-10 13:18:37,960 - 21480 - DEBUG - set(config) BODY="Test Msg"
2017-08-10 13:18:37,960 - 21480 - DEBUG - set(environment) BODY="Test Msg"
2017-08-10 13:18:37,960 - 21480 - DEBUG - get(default) INCLUDEIMAGE=None
2017-08-10 13:18:37,960 - 21480 - DEBUG - get(config) SERVERS="slack://Redacted TokenA/RedactedTokenB/RedactedTokenC/#notifications"
2017-08-10 13:18:37,961 - 21480 - DEBUG - get(config) SERVERS="slack://Redacted TokenA/RedactedTokenB/RedactedTokenC/#notifications"
2017-08-10 13:18:37,961 - 21480 - DEBUG - get(config) TITLE="Test"
2017-08-10 13:18:37,961 - 21480 - DEBUG - get(config) BODY="Test Msg"
2017-08-10 13:18:37,961 - 21480 - DEBUG - get(default) INCLUDEIMAGE=None
2017-08-10 13:18:37,961 - 21480 - DEBUG - get(default) INCLUDEIMAGE=None
2017-08-10 13:18:37,961 - 21480 - DEBUG - get(config) SERVERS="slack://Redacted TokenA/RedactedTokenB/RedactedTokenC/#notifications"
2017-08-10 13:18:37,964 - 21480 - DEBUG - Server parsed to: {'host': 'Redacted TokenA', 'user': None, 'query': '%23notifications', 'url': 'slack://Redacted TokenA/RedactedTokenB/RedactedTokenC/%23notifications', 'path': '/RedactedTokenB/RedactedTokenC/', 'fullpath': '/RedactedTokenB/RedactedTokenC/%23notifications', 'password': None, 'port': None, 'qsd': {}, 'schema': 'slack'}
2017-08-10 13:18:37,964 - 21480 - WARNING - No user was specified; using NZB-Notify.
2017-08-10 13:18:38,184 - 21480 - DEBUG - Slack POST URL: https://hooks.slack.com/services/Redacted TokenA/RedactedTokenB/RedactedTokenC (cert_verify=True)
2017-08-10 13:18:38,185 - 21480 - DEBUG - Slack Payload: {'username': 'NZB-Notify', 'mrkdwn': True, 'channel': '#notifications', 'attachments': [{'color': '#3AA3E3', 'text': 'Test Msg', 'footer': 'NZB-Notify', 'ts': 1502385518.184911, 'title': 'Test'}]}
2017-08-10 13:18:38,529 - 21480 - DEBUG - Exiting with return code: 93
Coming in with a fresh set of eyes, the heart is where the primary goal is achieved, and the goal is to notify.
Yes, but the project goal has far wider audience appeal used in CLI and without NZBGet. I say CLI purely because with that perspective, I saw how more efficient this could be made for purpose, and once done, then the project becomes useful for all manner of applications wanting to send notifications. Basically, this could be, pure notifications, and then adapters (using the model of Requests) for CLI, NZBGet, etc etc
Users browsing this forum: No registered users and 39 guests