Skip to content

SSSS-ODDEYE/vnotice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vnotice

License Issues
Stargazers Pulls
Contributors Commit Activity

vnotice是一个企业微信机器人消息推送脚本

Features

  • 事务通知
  • 机器人指定
  • 支持本地更新

Installation

请替换ROBOT_ID为你的机器人ID

git clone git@github.com:Ohto-Ai/vnotice
make install ROBOT_ID=XXXX-XXXX-XXXX-XXXX

如何获取一个机器人并拿到ID?

Update

# 使用vnotice升级
vnotice --update # v1.1.4及以上可用

# 使用make升级
cd `dirname \`readlink -f \\\`which vnotice\\\`\`` # 进入vnotice目录
make update # 升级vnotice

Usage

vnotice <tags> | {-c | --command} {command} | {-m | --message} {message}
详见 vnotice --help

examples

注意:大多数参数都拥有缩写和全称
-v = --version show version
-c = --command set commands
-m = --message show message without command

lunch-long-time-build-demo.sh; vnotice -m lunch finished, return $?
# 针对预期运行时间较长的脚本可以设置提醒

lunch-long-time-build-demo.sh; vnotice -u -c echo lunch finished, return $?
# 也可以使用echo指令发送消息

vnotice -c view-status-demo.sh && vnotice -m  view success || vnotice -m view failed
# 可以使用 -c 直接执行指令,执行完毕会返回指令结果,并被后续指令继续使用

vnotice -c use-multiple-parameters-demo.sh a --b "c" -d
# -c 不限制后续参数

vnotice -m One, two, three
vnotice --message One, two, three!!!
# 推荐使用-m输出消息

vnotice --robot YYY-YYY-YYY-YYY --message Hi, Robot Y
# 向指定机器人发送消息

License

This project is licensed under the terms of the MIT License.

FAQ

OhtoAi
beiklive

Special Thanks