fr3nch13/pushover-bash
Composer 安装命令:
composer require fr3nch13/pushover-bash
包简介
Pushover Bash Script
关键字:
README 文档
README
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.
- Options in /etc/pushover/pushover-config are processed first
- Options in $HOME/.pushover/pushover-config are processed next
- Options in ./pushover-config are processed next
- 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
fr3nch13/pushover-bash 适用场景与选型建议
fr3nch13/pushover-bash 是一款 基于 Shell 开发的 Composer 扩展包,目前已累计 1.19k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 07 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「notifications」 「pushover」 「bash」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 fr3nch13/pushover-bash 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 fr3nch13/pushover-bash 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 fr3nch13/pushover-bash 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Automatically restart PHP application once the source code changes
A Laravel Nova package that adds a notification feed in your Nova app.
A Yii2 PushOver log target and pushover messaging component
PHP Automation Tools
First-class Notifications for Craft CMS.
Captures outgoing SMS notifications
统计信息
- 总下载量: 1.19k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2023-07-19