i hope this is the appropriate forum/category to post this, if not please move/edit. I just wanted to share
a quick and simple script i did for use with Transmission and Boxcar. What it does is send a push notification
to your iOS device whenever a torrent has finished downloading.
All you need for this is the free Boxcar iOS app, create a account inside the app. Edit the token inside
the script. Set Transmission to call the script after a torrent is done. Thats it.
Code: Select all
#!/bin/sh
#
# Send push notification to iOS device when a torrent is complete.
#
# Requires: Boxcar account, Transmission torrent client and curl.
#
# Get the API token from the boxcar iOS app.
# Change text output below if you wish.
# Set Transmission to start script when torrent is complete.
# Make sure you keep this script as Plain-text, save changes.
# Open Terminal, go to folder of this script and do “chmod +x TransmissionBoxcar.sh”
#
#
#
# http://www.boxcar.io
# http://www.transmissionbt.com
#
#
# Available environment variables from Transmission (as of v2.83) are:
#
# TR_APP_VERSION
# TR_TIME_LOCALTIME
# TR_TORRENT_DIR
# TR_TORRENT_HASH
# TR_TORRENT_ID
# TR_TORRENT_NAME
#
# You need to change this! Get your token from the boxcar iOS app.
token=“XXXXXXXXXXXXXXXX”
# message title for the notification
title="'$TR_TORRENT_NAME' complete"
# the full message text when opened in the boxcar app (can use HTML)
message="<b>$TR_TORRENT_NAME</b> <br><br>is finished downloading. <br><br><br>$TR_TIME_LOCALTIME<br>"
# For a list of possible sounds, check the boxcar website
sound="'bird-1'"
# what shows up as source of the notification
source="Transmission"
# what url curl does connect to, do not change
url="https://new.boxcar.io/api/notifications"
# this now actually connects to boxcar and sends the notification, do not change
curl -k -d "user_credentials=$token" -d "notification[title]=$title" -d "notification[long_message]=$message" -d "notification[sound]=$sound" -d "notification[source_name]=$source" $url
#
#
# EOF