Giter Site home page Giter Site logo

pushbullet-exit's Introduction

pushbullet-exit

BASH script to send a pushbullet notification upon the exit of a unix shell command.

pushbullet-exit uses the Pushbullet API v2 to send a notification to your device when run. This can include an exit status to let you know that your command ran successfully or not, or it can just act as a naive indicator.

##Requirements:

  • curl must be installed
  • Your Pushbullet Account token must be accessible to the script (see "Account Token Handling" below)

##Instructions:

  • Call pushbullet-exit.sh in the terminal as you would any other shell script.
  • Ensure that your account token is in the appropriate place.
  • To include your exit status, put $? as the first argument like so:
    ./pushbullet-exit.sh $?

It's generally useful to call the script as part of a larget command, eg make install; ./pushbullet-exit.sh $?. Remember to use ;, as && will not run the script if the previous command fails.

##Account Token Handling This branch is reworking the handling of account tokens. Tokens are looked for in this priority:

  1. A -t flag when the script is called, manually specifying the key.
  2. An environment variable called PUSHBULLET_ACCT_TOKEN
  3. As the first line in ~/.config/pushbullet. This is similar to how pushbullet-bash, another pushbullet bash script on GitHub, handles tokens.
  4. In a file called acct-token in the current directory (Will be deprecated on April 1, 2015.)

##Future Features:

  • A more versatile options system to better customize notifications
  • Being able to pipe stdin to the body of the notification

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.