Skip to content

Instantly share code, notes, and snippets.

@koma5
Created April 9, 2011 13:09
Show Gist options
  • Select an option

  • Save koma5/911389 to your computer and use it in GitHub Desktop.

Select an option

Save koma5/911389 to your computer and use it in GitHub Desktop.

Revisions

  1. koma5 revised this gist Apr 9, 2011. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions prowl.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    #! /bin/sh
    # Usage: ./prowl.sh priority(-2 to 2) app event description
    # Example: ./prowl.sh 0 "transmission" "torrent has finished" "Coen Brothers Compilation has finised downloading"
    app=$1
    priority=$2
    priority=$1
    app=$2
    event=$3
    description=$4
    apikey=fill_in_your_API_key_here
    @@ -12,4 +12,4 @@ echo "Usage: ./prowl.sh priority(-2 to 2) app event description"
    echo 'Example: ./prowl.sh 0 "transmission" "torrent has finished" "Coen Brothers Compilation has finised downloading"'
    else
    curl https://prowl.weks.net/publicapi/add -F apikey=$apikey -F priority=$priority -F application="$app" -F event="$event" -F description="$description"
    fi
    fi
  2. koma5 created this gist Apr 9, 2011.
    15 changes: 15 additions & 0 deletions prowl.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #! /bin/sh
    # Usage: ./prowl.sh priority(-2 to 2) app event description
    # Example: ./prowl.sh 0 "transmission" "torrent has finished" "Coen Brothers Compilation has finised downloading"
    app=$1
    priority=$2
    event=$3
    description=$4
    apikey=fill_in_your_API_key_here

    if [ $# -ne 4 ]; then
    echo "Usage: ./prowl.sh priority(-2 to 2) app event description"
    echo 'Example: ./prowl.sh 0 "transmission" "torrent has finished" "Coen Brothers Compilation has finised downloading"'
    else
    curl https://prowl.weks.net/publicapi/add -F apikey=$apikey -F priority=$priority -F application="$app" -F event="$event" -F description="$description"
    fi