Github Notifier
项目描述
.. image:: https://github.com/FFY00/discord-github-release-notifier/raw/master/logo.png
=======================
Discord Github Release Notifier
=======================
.. image:: https://img.shields.io/github/release/FFY00/discord-github-release-notifier.svg
:alt: 最新版本
:target: http://github.com/FFY00/discord-github-release-notifier/releases
.. image:: https://img.shields.io/pypi/v/discord-github-release-notifier.svg
:alt: 最新版本
:target: https://pypi.ac.cn/project/discord-github-release-notifier/
这是`femtopixel <https://github.com/femtopixel>`_'s `Github Release Notifier <https://github.com/femtopixel/github-release-notifier>`_的分支,通知已被调整为Discord。
安装
------------
.. code:
pip3 install discord-github-release-notifier
用法
-----
.. code:
用法:discord-github-release-notifier [-h] [--action {cron,subscribe,unsubscribe}]
[--package PACKAGE] [--webhook WEBHOOK] [--uuid UUID]
可选参数
-h, --help 显示此帮助信息并退出
--action {cron,subscribe,unsubscribe}, -a {cron,subscribe,unsubscribe}
执行的操作(默认:cron)
--package PACKAGE, -p PACKAGE
Github包名/URL(对于
subscribe/unsubscribe)- 订阅时打印uuid
--webhook WEBHOOK, -w WEBHOOK
您的webhook URL(对于
subscribe/unsubscribe)
--uuid UUID, -u UUID 您的webhook UUID(对于取消订阅必需)
示例
~~~~~~~
首先,我注册我的webhook
.. code:
discord github-release-notifier --action subscribe --webhook https://discordapp.com/api/webhooks/{webhook.id}/{webhook.token} --package jaymoulin/google-music-manager
会打印一个uuid。此uuid将用于取消订阅webhook。
当 `jaymoulin/google-music-manager` 发布新版本时,`https://discordapp.com/api/webhooks/{webhook.id}/{webhook.token}` 将会被调用以发送发布详情。
为了实现这一点,系统应该检查是否有新版本发布。
我们可以通过不带参数调用 `discord-github-release-notifier` 或者设置 `--action` 为 `cron`(这是默认设置)来实现。
为了自动化此过程,我们可以在 cronjob 中添加此过程
.. code:
(crontab -l ; echo "0 0 * * * discord-github-release-notifier") | sort - | uniq - | crontab -
这将每天午夜检查是否有新版本发布。
提交错误和功能请求
------------------------------------
错误和功能请求在 GitHub 上跟踪
作者
------
Jay MOULIN jaymoulin+github-release-notifier@gmail.com 参与此项目的贡献者名单也请参阅。
Filipe LAÍNS filipe.lains@gmail.com(对 Discord 的适配)
许可证
-------
Discord Github Release Notifier 在 MIT 许可下授权
=======================
Discord Github Release Notifier
=======================
.. image:: https://img.shields.io/github/release/FFY00/discord-github-release-notifier.svg
:alt: 最新版本
:target: http://github.com/FFY00/discord-github-release-notifier/releases
.. image:: https://img.shields.io/pypi/v/discord-github-release-notifier.svg
:alt: 最新版本
:target: https://pypi.ac.cn/project/discord-github-release-notifier/
这是`femtopixel <https://github.com/femtopixel>`_'s `Github Release Notifier <https://github.com/femtopixel/github-release-notifier>`_的分支,通知已被调整为Discord。
安装
------------
.. code:
pip3 install discord-github-release-notifier
用法
-----
.. code:
用法:discord-github-release-notifier [-h] [--action {cron,subscribe,unsubscribe}]
[--package PACKAGE] [--webhook WEBHOOK] [--uuid UUID]
可选参数
-h, --help 显示此帮助信息并退出
--action {cron,subscribe,unsubscribe}, -a {cron,subscribe,unsubscribe}
执行的操作(默认:cron)
--package PACKAGE, -p PACKAGE
Github包名/URL(对于
subscribe/unsubscribe)- 订阅时打印uuid
--webhook WEBHOOK, -w WEBHOOK
您的webhook URL(对于
subscribe/unsubscribe)
--uuid UUID, -u UUID 您的webhook UUID(对于取消订阅必需)
示例
~~~~~~~
首先,我注册我的webhook
.. code:
discord github-release-notifier --action subscribe --webhook https://discordapp.com/api/webhooks/{webhook.id}/{webhook.token} --package jaymoulin/google-music-manager
会打印一个uuid。此uuid将用于取消订阅webhook。
当 `jaymoulin/google-music-manager` 发布新版本时,`https://discordapp.com/api/webhooks/{webhook.id}/{webhook.token}` 将会被调用以发送发布详情。
为了实现这一点,系统应该检查是否有新版本发布。
我们可以通过不带参数调用 `discord-github-release-notifier` 或者设置 `--action` 为 `cron`(这是默认设置)来实现。
为了自动化此过程,我们可以在 cronjob 中添加此过程
.. code:
(crontab -l ; echo "0 0 * * * discord-github-release-notifier") | sort - | uniq - | crontab -
这将每天午夜检查是否有新版本发布。
提交错误和功能请求
------------------------------------
错误和功能请求在 GitHub 上跟踪
作者
------
Jay MOULIN jaymoulin+github-release-notifier@gmail.com 参与此项目的贡献者名单也请参阅。
Filipe LAÍNS filipe.lains@gmail.com(对 Discord 的适配)
许可证
-------
Discord Github Release Notifier 在 MIT 许可下授权
项目详情
关闭
discord_github_release_notifier-1.0.1.tar.gz 的散列值
算法 | 散列摘要 | |
---|---|---|
SHA256 | 0364d08f9e2b0e28bb9f3390c0ed72bec31024760d4c155ae2a07eb5c12bd83f |
|
MD5 | 3b5979e57c949e1f40556bdd02c44946 |
|
BLAKE2b-256 | 322d1b210849582669937675558d483c0fd572a1236d3b9136b2830c52656dc6 |