npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@fr3nch13/pushover-bash

v1.0.4

Published

A Bash shell script to send pushover notifications.

Downloads

7

Readme

CI Bash CI Composer CI NPM

Pushover Bash Script

A Bash shell script to send pushover notifications. A Pushover account is required to use this script.

Based on the original Pushover Bash by akusei.

Usage

usage: pushover.sh <apikey> <userkey> <message> [options]

  -t,  --token APIKEY        The pushover.net API Key for your application
  -u,  --user USERKEY        Your pushover.net user key
  -m,  --message MESSAGE     The message to send; supports HTML formatting
  -a,  --attachment filename The Picture you want to send
  -T,  --title TITLE         Title of the message
  -d,  --device NAME         Comma seperated list of devices to receive message
  -U,  --url URL             URL to send with message
       --url-title URLTITLE  Title of the URL
  -p,  --priority PRIORITY   Priority of the message
                               -2 - no notification/alert
                               -1 - quiet notification
                                0 - normal priority
                                1 - bypass the user's quiet hours
                                2 - require confirmation from the user
  -e,  --expire SECONDS      Set expiration time for for notifications with priority 2 (default 180)
  -r,  --retry COUNT         Set retry period for notifications with priority 2 (default 30)
  -s,  --sound SOUND         Notification sound to play with message
                                pushover - Pushover (default)
                                bike - Bike
                                bugle - Bugle
                                cashregister - Cash Register
                                classical - Classical
                                cosmic - Cosmic
                                falling - Falling
                                gamelan - Gamelan
                                incoming - Incoming
                                intermission - Intermission
                                magic - Magic
                                mechanical - Mechanical
                                pianobar - Piano Bar
                                siren - Siren
                                spacealarm - Space Alarm
                                tugboat - Tug Boat
                                alien - Alien Alarm (long)
                                climb - Climb (long)
                                persistent - Persistent (long)
                                echo - Pushover Echo (long)
                                updown - Up Down (long)
                                none - None (silent)
  -x,  --validate            If set, it will only validate the account
  -v,  --verbose             Return API execution reply to stdout
  -d,  --debug               Print out debugging information
                                WARNING, this will output your user key and token to stdout

Configuration

Configuration files can be placed in /etc/pushover/pushover-config, in the user's home directory at $HOME/.pushover/pushover-config, or in the root of this repository. The options are processed in order of importance for location. You can copy pushover-config-dist to pushover-config in any of these places.

  1. Options in /etc/pushover/pushover-config are processed first
  2. Options in $HOME/.pushover/pushover-config are processed next
  3. Options in ./pushover-config are processed next
  4. Command line arguments override all configuration values

The default configuration is empty and contains the following:

api_token=
user_key=
device=
url=
url_title=
priority=
title=
sound=

NOTE: If you have a value defined in /etc/default/ and also have overrides in $HOME/.pushover/ all empty options in $HOME/.pushover/ must not exist in the file. For example, I have the following configuration in /etc/default/

api_token=my-app-api-token
user_key=my-user-key
device=
url=
url_title="I want all URLs to have this title"
priority=
title="this is a generic title"
sound=

If I want to override only title for a specific user, the configuration in $HOME/.pushover/ will look like this

title="title for specific user"

Support

  • For PHP Composer based projects, see COMPOSER.md
  • For Node.js/NPM based projects, see NPM.md
  • Currently working on Python's PyPi

Examples

Send a simple "This is a test" message to all devices using the stored configuration in either /etc/default/pushover-config, $HOME/.pushover/pushover-config, or ./pushover-config

pushover.sh -m "This is a test"

Send a simple "This is a test" message to all devices using the specified API token and user key

pushover.sh -t token -u key -m "This is a test"

Send a simple "This is a test" message with the title "Test Title" to all devices using the specified API token and user key

pushover.sh -t token -u key -m "This is a test" -T "Test Title"

Send a simple "This is a test" message to the devices named "Phone" and "Home Desktop" using the specified API token and user key

pushover.sh -t token -u key -m "This is a test" -d "Phone,Home Desktop"

Send a simple "This is a test" message to all devices that contains a link to www.google.com titled "Google" using the specified API token and user key

pushover.sh -t token -u key -m "This is a test" -U "http://www.google.com" --url-title Google

Send a simple "This is a test" high priority message to all devices using the specified API token and user key

pushover.sh -t token -u key -m "This is a test" -p 1

Send a simple "This is a test" message to all devices that uses the sound of a bike bell as the notification sound using the specified API token and user key

pushover.sh -t token -u key -m "This is a test" -s bike

Sends a simple "This is a test Pic" message to all devices and send the Picture with the message

pushover.sh -t token -u key -m "This is a test Pic" -a /path/to/pic.jpg