Growl/Prowl push notifications

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
gardnerd4me
Posts: 9
Joined: 21 Oct 2014, 04:36

Growl/Prowl push notifications

Post by gardnerd4me »

I see a lot of different ways of getting notified when filebot completes a process, so here's another. I run growlnotify to get the alerts on my Macbook Pro, then use Growl to send them to Prowl via API key. This lets me get alerts on my Timer. I only wish Apples push api allowed for icon replacement so I could change the prowl logo, but que sera, sera. Enjoy!

Here are both my transmission post-process script and external script that are called.

Transmission post-process.sh

Code: Select all

#!/bin/sh -xu

# Input Parameters
ARG_PATH="$TR_TORRENT_DIR/$TR_TORRENT_NAME"
ARG_NAME="$TR_TORRENT_NAME"

# Configuration
CONFIG_OUTPUT="/Volumes/Media"

# Command
/usr/local/bin/filebot -script fn:amc --output "$CONFIG_OUTPUT" --action copy --conflict auto -non-strict --log-file amc.log --def 'excludeList=amc.txt' 'ignore=idx|sub|srt' 'artwork=n' --def "exec=/Users/.../Documents/Scripts/AMC/growlnotify.sh" ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" --def movieFormat="Movies/{n.replaceAll(/[']/, "")}/{n.replaceAll(/[']/, "")}" --def seriesFormat="TV Shows/{n.replaceAll(/[']/, "")}/{episode.special ? 'Season 0' : 'Season '+s}/{episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.replaceAll(/[']/, "")}"
growlnotify.sh

Code: Select all

#!/bin/sh -xu

# growlnotify Command
growlnotify -n Filebot --image ~/Documents/Scripts/AMC/filebot.icns -t "Process Complete" -m "File Moved to NAS"
Last edited by gardnerd4me on 24 Mar 2018, 19:31, edited 4 times in total.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Growl/Prowl push notifications

Post by rednoah »

Huh... I never even thought of using @files with --def exec! Well done! :lol:
:idea: Please read the FAQ and How to Request Help.
gardnerd4me
Posts: 9
Joined: 21 Oct 2014, 04:36

Re: Growl/Prowl push notifications

Post by gardnerd4me »

rednoah wrote: 23 Mar 2018, 10:03 Huh... I never even thought of using @files with --def exec! Well done! :lol:
Says the guy I learned it from, ;)

OK, so it doesn't work. I had it working when testing from the command line, but as a post-process script from Transmission it breaks because filebot interprets the {...} literally. Back to the drawing board. Fixed so it's at least usable, still miss the @
Post Reply