Skip to content

A simpler way to send pushover notifications using bash

License

Notifications You must be signed in to change notification settings

Lanjelin/bashover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

bashover

A simpler way to send pushover notifications using bash
Every argument for pushover available directly from the terminal, supports configuration files.

Examples

./bashover.sh -t "token-goes-here" -u "user-key-here" -m "Hello World" --title "Bashover"

./bashover.sh -t "token" -u "user" -m "Here is the latest screenshot" --title "Screenshot" --attachment ~/screenshot.png --priority "1" --sound "tugboat" -v

./bashover.sh -c ~/.conf/bashover/server.conf --attachment ~/temperatures.png -m "High temperature on drive 1" --title "Warning: high temp"

Config file

The script creates a defaul config.file at ~/.config/bashover/default.conf where default values for all arguments can be stored.
Parsed arguments takes precedence, and default values can be ignored by parsing -i or --ignore-defaults.

This way token, user key and title can be stored as defaults, and a message can be sent by a simple command as ./bashover.sh -m "Hello World"

Additional config files can be used, and parsed using the -c or --config argument.
./bashover.sh -c ~/my-bashover-config.conf

Arguments

Bashover arguments

  • -i or --ignore-defaults - ignore the default config file
  • -v - outputs the returned response from pushover
  • -c or --config - parse a custom config file

Pushover defaults

  • -t or --token - your application's API token (required)
  • -u or --user - your user/group key (required)
  • -m or --message - your message (required)
  • --attachment - a binary image attachment to send with the message (documentation)
  • --attachment-base64 - a Base64-encoded image attachment to send with the message (documentation)
  • --attachment-type - the MIME type of the included attachment or attachment_base64 (documentation)
  • --device - the name of one of your devices to send just to that device instead of all devices (documentation)
  • --html - set to 1 to enable HTML parsing (documentation)
  • --priority - a value of -2, -1, 0 (default), 1, or 2 (documentation)
  • --sound - the name of a supported sound to override your default sound choice (documentation)
  • --timestamp - a Unix timestamp of a time to display instead of when our API received it (documentation)
  • --title - your message's title, otherwise your app's name is used
  • --ttl - a number of seconds that the message will live, before being deleted automatically (documentation)
  • --url - a supplementary URL to show with your message (documentation)
  • --url-title - a title for the URL specified as the url parameter, otherwise just the URL is shown (documentation)