Coder Social home page Coder Social logo

arpadmuller / pushover-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from markus-perl/pushover-cli

0.0 0.0 0.0 31 KB

pushover-cli is a command line client for https://pushover.net to send pushover notifications. Moreover it is possible with this client to pipe streams directly to your cellphone like tail -f /var/log/my.log | pushover-cli -

Python 100.00%

pushover-cli's Introduction

pushover-cli

pushover-cli is a Python-based command-line client for https://pushover.net to send pushover notifications. This can be used for a variety of purposes, including:

  • Sending control messages to an old phone running Youtube to start/pause/stop/etc. the playing video remotely.
  • Piping streams to your cellphone (e.g. tail -f /var/log/my.log | pushover-cli -)
  • It's essentially an MQTT channel, so anything that can read a pushover message can act on it.
  • Tie pushover notifications into your long-running scripts (build, cleanup, upgrade, etc.) to get notices of different system events.

Requirements

Download and installation

Simply execute the following command to install the latest version of this script to your system:

sudo curl -o /usr/bin/pushover-cli https://raw.githubusercontent.com/markus-perl/pushover-cli/master/pushover-cli 
sudo chmod 555 /usr/bin/pushover-cli

Commandline options

Usage:   pushover-cli [options] <message> <title>
Stdin:   pushover-cli [options] - <title>
Example: pushover-cli -u ubLBe5u3zNXF9gBtX2zKkezSuPgu3v -t aK5BW3sjAqPsedH44VyQSbaQecoRen "Hello World"

    -u --user     <user id>             Pushover User-ID
    -t --token    <api token>           Pushover API-Token
    -d --device   <device name>         Device Name (if omitted, will broadcast to all devices)
    -p --priority <highest, high, normal, low, lowest>   Default: normal
    -l --url      <url>                 Link the message to this URL
    -s --sound    <notification sound>  Default: pushover - see https://pushover.net/api#sounds
    -c --config   <path to file>        Default: /etc/pushover.conf
    -v --verbose                        Be verbose
    -q --quiet                          Be quiet

Proxy Utilization

Incorporating the PR from acaranta that enabled proxy support, if the HTTP_ENV environment variable is pointed at a proxy server URL, pushover-cli will treat that as the proxy gateway and route the message to Pushover through it.

Config file

Every command line option can also be set by creating the config file ~/.pushover-cli.conf or /etc/pushover-cli.conf

Example file:

user=<Pushover User ID>
token=<Pushover Application API Token>
priority=normal
verbose=0
quiet=0

After creating this file it is no more necessary to specify these options in the command line which makes it more easier to send a message:

$ pushover-cli "My Message" "My Title"

or

$ pushover-cli -d 'my_phone' 'My Message' 'My Title'

or

$ pushover-cli -s 'none' 'My Message' 'My Title'

for silent notification or use other tones https://pushover.net/api#sounds

pushover-cli's People

Contributors

scottjwalter avatar markus-perl avatar seniorbook avatar der-pw avatar b-onc avatar cjdg avatar

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.