This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'pushbullet' | |
client = Pushbullet::Client.new("#{ENV['NZBOP_PUSH_PUSH_SH_API']}") | |
message = <<EOF | |
Category: #{ENV['NZBPP_CATEGORY']} | |
--------------------------------- | |
#{ENV['NZBPP_NZBNAME']} | |
--------------------------------- | |
Status | |
Repair:#{ENV['NZBPP_PARSTATUS'] != 1 ? 'Good' : 'Failed'} \ | |
Unpack:#{ENV['NZBPP_UNPACKSTATUS'] != 1 ? 'Good' : 'Failed'} | |
EOF | |
client.push_note_to("#{ENV['NZBOP_PUSH_PUSH_SH_EMAIL']}", 'Download Finished', "#{message}") | |
exit 93 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################################## | |
### NZBGET POST-PROCESSING SCRIPT ### | |
# Send pushbullet notification. | |
# | |
# This script sends a pushbullet notification when the job is finished. | |
# | |
# NOTE: RVM with at least 1 installed ruby is required | |
# | |
# The push bullet gem must be installed as well | |
############################################################################## | |
### OPTIONS ### | |
# RVM ruby version to use | |
# | |
# INFO: e.g. 2.1.1 | |
#Ruby= | |
# Pushbullet API key | |
#Api= | |
# Email address of recipient | |
# | |
# INFO: Recipient must add you as a friend | |
#Email= | |
# Path to your home directory | |
# | |
# INFO: e.g. /Users/John | |
#User= | |
### NZBGET POST-PROCESSING SCRIPT ### | |
if [[ -s $NZBOP_PUSH_PUSH_SH_USER/.rvm/scripts/rvm ]]; then | |
. $NZBOP_PUSH_PUSH_SH_USER/.rvm/scripts/rvm | |
fi | |
rvm "$NZBPO_RUBY" | |
exec ruby "$NZBOP_ScriptDir"/push/push.rb | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment