跳转到主要内容

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-1.0.1.tar.gz (38.4 kB 查看散列值)

上传时间

支持者