From 9cec01d1e8efdf9fcd075d2a41dfb499205ba94f Mon Sep 17 00:00:00 2001 From: dnzbk Date: Thu, 11 Jan 2024 14:00:28 +0300 Subject: [PATCH] Add: manifest --- .github/workflows/release.yml | 3 +- README.md | 5 +- EMail.py => main.py | 72 +------------------ manifest.json | 131 ++++++++++++++++++++++++++++++++++ 4 files changed, 138 insertions(+), 73 deletions(-) rename EMail.py => main.py (79%) create mode 100644 manifest.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f410d3..c14ab9b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,5 +9,6 @@ jobs: release: uses: nzbgetcom/nzbget-extensions/.github/workflows/extension-release.yml@main with: - release-file-list: EMail.py + release-file-list: main.py manifest.json release-file-name: email + release-dir: email diff --git a/README.md b/README.md index 18bdbb1..1545807 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +> **Note:** This script is compatible with NZBGet v23 and above. +For older versions of NZBGet please use [v1.0](https://github.com/nzbgetcom/Extension-EMail/releases/tag/v1.0) release. + # EMail EMail [script](https://nzbget.com/documentation/post-processing-scripts/) for [NZBGet](https://nzbget.com). @@ -5,4 +8,4 @@ This script sends E-Mail notification when the job is done. Author: Andrey Prygunkov -> **Note:** This script is compatible with python 3.8.x and above. +> **Note:** This script requires Python to be installed on your system. diff --git a/EMail.py b/main.py similarity index 79% rename from EMail.py rename to main.py index 1932efd..c35f843 100644 --- a/EMail.py +++ b/main.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # E-Mail post-processing script for NZBGet # @@ -15,78 +14,9 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # - -############################################################################## -### NZBGET POST-PROCESSING SCRIPT ### - -# Send E-Mail notification. -# -# This script sends E-Mail notification when the job is done. -# -# NOTE: This script requires Python to be installed on your system. - -############################################################################## -### OPTIONS ### - -# When to send the message (Always, OnFailure). -#SendMail=Always - -# Email address you want this email to be sent from. -#From="NZBGet" - -# Email address you want this email to be sent to. -# -# Multiple addresses can be separated with comma. -#To=myaccount@gmail.com - -# SMTP server host. -#Server=smtp.gmail.com - -# SMTP server port (1-65535). -#Port=25 - -# Secure communication using TLS/SSL (yes, no, force). -# no - plain text communication (insecure); -# yes - switch to secure session using StartTLS command; -# force - start secure session on encrypted socket. -#Encryption=yes - -# SMTP server user name, if required. -#Username=myaccount - -# SMTP server password, if required. -#Password=mypass - -# To check connection parameters click the button. -#ConnectionTest@Send Test E-Mail - -# Append statistics to the message (yes, no). -#Statistics=yes - -# Append list of files to the message (yes, no). -# -# Add the list of downloaded files (the content of destination directory). -#FileList=yes - -# Append broken-log to the message (yes, no). -# -# Add the content of file _brokenlog.txt. This file contains the list of damaged -# files and the result of par-check/repair. For successful downloads the broken-log -# is usually deleted by cleanup-script and therefore is not sent. -#BrokenLog=yes - -# Append nzb log to the message (Always, Never, OnFailure). -# -# Add the download and post-processing log of active job. -#NzbLog=OnFailure - -### NZBGET POST-PROCESSING SCRIPT ### -############################################################################## - - import os import sys import datetime diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..4b10b61 --- /dev/null +++ b/manifest.json @@ -0,0 +1,131 @@ +{ + "main": "main.py", + "name": "EMail", + "homepage": "", + "kind": "POST-PROCESSING", + "displayName": "EMail", + "version": "2.0.0", + "author": "Andrey Prygunkov", + "license": "GNU", + "about": "Send E-Mail notification.", + "queueEvents": "", + "requirements": [ + "This script requires Python to be installed on your system." + ], + "description": ["This script sends E-Mail notification when the job is done."], + "options": [ + { + "name": "SendMail", + "displayName": "SendMail", + "value": "Always", + "description": ["When to send the message."], + "select": ["Always", "OnFailure"] + }, + { + "name": "From", + "displayName": "From", + "value": "\"NZBGet\" ", + "description": ["Email address you want this email to be sent from."], + "select": [] + }, + { + "name": "To", + "displayName": "To", + "value": "myaccount@gmail.com", + "description": [ + "Email address you want this email to be sent to.", + "", + "Multiple addresses can be separated with comma." + ], + "select": [] + }, + { + "name": "Server", + "displayName": "Server", + "value": "smtp.gmail.com", + "description": ["SMTP server host."], + "select": [] + }, + { + "name": "Port", + "displayName": "Port", + "value": 25, + "description": ["SMTP server port (1-65535)"], + "select": [1, 65535] + }, + { + "name": "Encryption", + "displayName": "Encryption", + "value": "yes", + "description": [ + "Secure communication using TLS/SSL.", + "", + "no - plain text communication (insecure);", + "yes - switch to secure session using StartTLS command;", + "force - start secure session on encrypted socket." + ], + "select": ["no", "yes", "force"] + }, + { + "name": "Username", + "displayName": "Username", + "value": "yes", + "description": ["SMTP server user name, if required."], + "select": [] + }, + { + "name": "Password", + "displayName": "Password", + "value": "mypass", + "description": ["SMTP server password, if required."], + "select": [] + }, + { + "name": "Statistics", + "displayName": "Statistics", + "value": "yes", + "description": ["Append statistics to the message."], + "select": ["yes", "no"] + }, + { + "name": "FileList", + "displayName": "FileList", + "value": "yes", + "description": [ + "Append list of files to the message.", + "", + "Add the list of downloaded files (the content of destination directory).." + ], + "select": ["yes", "no"] + }, + { + "name": "BrokenLog", + "displayName": "BrokenLog", + "value": "yes", + "description": [ + "Append broken-log to the message.", + "", + "Add the content of file _brokenlog.txt. This file contains the list of damaged", + "files and the result of par-check/repair. For successful downloads the broken-log", + "is usually deleted by cleanup-script and therefore is not sent." + ], + "select": ["yes", "no"] + }, + { + "name": "NzbLog", + "displayName": "NzbLog", + "value": "OnFailure", + "description": ["Append nzb log to the message.Add the download and post-processing log of active job.."], + "select": ["Always", "Never", "OnFailure"] + } + ], + "commands": [ + { + "name": "ConnectionTest", + "action": "Send Test E-Mail", + "displayName": "ConnectionTest", + "description": ["To check connection parameters click the button."] + } + ], + "taskTime": "" +}