Skip to content

Instantly share code, notes, and snippets.

@aldur
Last active November 14, 2017 21:19
Show Gist options
  • Save aldur/4bea0ac1039d65416317 to your computer and use it in GitHub Desktop.
Save aldur/4bea0ac1039d65416317 to your computer and use it in GitHub Desktop.
Transmission Daemon script: push to Pushbullet

Push torrent completion form Transmission daemon

This script will let Transmission push to your Pushbullet account on Torrent completion.

Configuration

Set your Pushbullet access token. Then edit your Transmission settings.json file as follows:

...

script-torrent-done-enabled: true
script-torrent-done-filename: <PATH_TO_THIS_SCRIPT>

...

Enjoy!

#!/bin/sh
# Set your pushbullet access token here:
PUSHBULLET_ACCESS_TOKEN=SPECIFY_ACCESS_TOKEN_HERE
# -- END of user configurable variables. --
PUSHBULLET_API_PUSH=https://api.pushbullet.com/v2/pushes
curl --header "Authorization: Bearer $PUSHBULLET_ACCESS_TOKEN" \
-o /dev/null \
-fs \
-X POST $PUSHBULLET_API_PUSH \
--header 'Content-Type: application/json' \
--data-binary "{
\"type\": \"note\",
\"title\": \"Transmission download completed\",
\"body\": \"$TR_TORRENT_NAME finished downloading @ $TR_TIME_LOCALTIME.\"
}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment