[Windows] Pushbullet Notifications
Posted: February 10th, 2015, 2:54 pm
Hello,
I couldn't find a script to send Pushbullets on Windows, sabToPushBullet by spants didn't work. I played with it a bit and decided I may as well start from scratch for Windows. Then spotted Twitter Notification for Windows by mookydudz and modified his code to work with Pushbullet.
***Credits****
Mookydudz creator of [Windows] Twitter Notifications
***Instructions***
The only thing you need is CURL for Windows which you can find here: http://curl.haxx.se/download.html
1. Put CURL in your SABnzbd folder or ensure it's in your PATH Enviroment variables in Windows. You could also alter CURL in the batch file to show its full path.
2. Open a text editor and copy & paste the following (Notepad will do) :
3. Add your api key after "api=" and the deviceid of the device you want to send the Pushbullet to after "deviceid=". If you want to send to all devices leave it blank.
4. Save as "sabPushbulletWin.bat" in your post-processing script folder.
5. Assign it to a category, so it runs after your download has completed.
I couldn't find a script to send Pushbullets on Windows, sabToPushBullet by spants didn't work. I played with it a bit and decided I may as well start from scratch for Windows. Then spotted Twitter Notification for Windows by mookydudz and modified his code to work with Pushbullet.
***Credits****
Mookydudz creator of [Windows] Twitter Notifications
***Instructions***
The only thing you need is CURL for Windows which you can find here: http://curl.haxx.se/download.html
1. Put CURL in your SABnzbd folder or ensure it's in your PATH Enviroment variables in Windows. You could also alter CURL in the batch file to show its full path.
2. Open a text editor and copy & paste the following (Notepad will do) :
Code: Select all
REM - Sabnzbd PushBullet post-processing script for Windows
REM - Add your api key and the deviceid of the device to receive the notifcation below. Leave blank to send to all devices.
CLS
SET api=
SET deviceid=
SET status=%7
SET zero=0
SET filename=%3
SET filename=%filename: ="%
IF %status% EQU %zero% (GOTO :SUCCESS) ELSE (GOTO :FAIL)
:SUCCESS
SET title=Sabnzbd - Download Successfull
SET msg=Sabnzbd - Successfully downloaded %filename%
curl https://api.pushbullet.com/api/pushes -u "%api%": -d device_iden="%deviceid%" -d type=note -d title="%title%" -d body="%msg%" -X POST -k -s -S
EXIT
:FAIL
SET title=Sabnzbd - Download Failed
SET msg=Sabnzbd - Failed to download %filename%
curl https://api.pushbullet.com/api/pushes -u "%api%": -d device_iden="%deviceid%" -d type=note -d title="%title%" -d body="%msg%" -X POST -k -s -S
EXIT
4. Save as "sabPushbulletWin.bat" in your post-processing script folder.
5. Assign it to a category, so it runs after your download has completed.