使用多种服务将通知直接推送到手机

notify-push的Python项目详细描述


https://img.shields.io/pypi/v/notify-push.svghttps://img.shields.io/pypi/pyversions/notify-push.svg

notify push是一个cli工具,用于将通知直接推送到手机上。

通常的系统管理方法是通过电子邮件发送警报,但是有大量的移动应用程序允许我们发送推送通知,为什么不使用那些更快和更干净的警报?

安装

只需使用pip在系统范围内安装即可:

$ sudo pip install git+https://github.com/fopina/notify-push/

或仅适用于您的用户

$ pip install --user git+https://github.com/fopina/notify-push/

用法

$ notify-push -h
usage: notify-push [OPTIONS] message...

Push notifications straight to your phone using multiple services

positional arguments:
  message               message

optional arguments:
  -s SERVICE, --service SERVICE
                        use only this service
  --list-services
  -c CONFIG, --config CONFIG
                        use this configuration file instead of ~/.notifypush
  --version             show program's version number and exit

当前支持的服务有:

$ notify-push --list-services
notifcasterbot
pushitbot

配置文件~/.notifypush

的示例
[pushitbot]
token = 355aac1b7f0efe055b3f2f663cae16dd

推送消息现在非常简单:

$ notify-push hello world
Pushed

或者使用stdin(对shell管道有用):

$ notify-push
Press ctrl-D when done
hello world
Pushed
$ echo hello world | notify-push
Press ctrl-D when done
Pushed

您还可以从其他python脚本中轻松使用它:

>>>importnotifypush>>>printnotifypush.push('hello world')True

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
for循环如何使用Java8流迭代x次?   macos如何从java代码执行以下命令行表达式?   java为什么可以使用类名作为向量类型?   在Java中读取平面文件中的XML文件   java为什么gradlew在不同的机器上构建不同的JAR?   线程“main”java中出现异常。lang.NoClassDefFoundError:名称错误:   java安装了Eclipse2006,但没有在文件>新建部分下获取Maven项目   用Java绘制头部和颈部。拉绳问题   线程“main”java中出现异常。lang.ArrayIndexOutofBounds异常:65   java为什么用通配符创建的比较器的compare方法不能接受对象?   date查找Java未来十年特定节日的一周中的哪一天   哈希匹配Java SHA2输出与MySQL SHA2输出   java JsArray从html5存储接收数据后无法返回长度   当实例的成员暴露于外部世界时,可以对其进行垃圾收集   java eclipse允许一次只查看一个表达式吗