Skip to content

Instantly share code, notes, and snippets.

@vor0nwe
Last active July 23, 2022 19:43
Show Gist options
  • Save vor0nwe/e33ace72c850f93bc979 to your computer and use it in GitHub Desktop.
Save vor0nwe/e33ace72c850f93bc979 to your computer and use it in GitHub Desktop.
Send a PushBullet notification when Transmission has finished a download.
#!/bin/bash
curl -u YOUR_ACCESS_TOKEN: \
-X POST https://api.pushbullet.com/v2/pushes \
--header 'Content-Type: application/json' \
--data-binary "{\"type\":\"note\",\"title\":\"Downloaded\",\"body\":\"$TR_TORRENT_NAME: $TR_TIME_LOCALTIME\"}"
#
# Get YOUR_ACCESS_TOKEN from your account page at https://www.pushbullet.com/account
#
# Find transmission's settings.json, and update the following two lines
#
# "script-torrent-done-enabled": true,
# "script-torrent-done-filename": "/path/to/where/you/saved/this/gist/transmission-torrent-done.sh",
#
@vor0nwe
Copy link
Author

vor0nwe commented Jan 16, 2020

Sorry about that, @ssandras and @andycarver101; I never got a notification about these comments.
Shell $VARIABLE expansion doesn’t work when you use single quotes. I’ve updated the gist to use double quotes instead (which means escaping all the JSON double quotes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment