跳转到主要内容

keel.sh的Telegram机器人

项目描述

keel-telegram-bot 构建状态 代码气候 PyPI版本

keel-telegram-bot 是一个用于 Keel 的Telegram机器人。

功能

  • 接收通知(通过Webhook)
  • 列出审批
  • 批准挂起的审批
  • 拒绝挂起的审批
  • 删除存档的审批
  • 基于Telegram用户名处理权限
  • 根据聊天过滤可见的审批

如何使用

手动安装

安装

使用pip安装 keel-telegram-bot

pip3 install keel-telegram-bot

配置

keel-telegram-bot 使用 container-app-conf 通过YAML文件以及ENV变量提供配置。请参阅有关它的文档

在此存储库中查看keel-telegram-bot_example.yaml 的示例。

运行

使用以下命令启动机器人

keel-telegram-bot

Docker

要使用docker运行 keel-telegram-bot,您可以使用来自DockerHub的 markusressel/keel-telegram-bot 镜像

sudo docker run -t \
    markusressel/keel-telegram-bot:latest

使用环境变量配置图片,或将配置文件从主机系统挂载到 /app/keel-telegram-bot.yaml

设置

此机器人使用Keel提供的REST API与之交互,并依赖于Webhook功能来接收和转发通知到Telegram聊天。一方面 keel-telegram-bot 起到网页界面的作用,另一方面它起到代理的作用,两者合并成一个单一包。

要使命令生效,只需提供配置文件的所有必要详细信息。

要使通知生效,您需要将 keel-telegram-bot 的地址通过 WEBHOOK_ENDPOINT 环境变量提供给Keel。最简单的方法是在同一主机上运行Keel和 keel-telegram-bot,并指定 http://localhost:5000/

贡献

GitHub是社交编码的平台:如果您想编写代码,我鼓励通过从这个存储库的分支创建拉取请求的方式贡献。为错误和新功能创建GitHub票据,并评论您感兴趣的内容。

许可证

keel-telegram-bot by Markus Ressel
Copyright (C) 2020  Markus Ressel

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://gnu.ac.cn/licenses/>.

项目详情


下载文件

下载您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源分布

keel-telegram-bot-1.3.1.tar.gz (65.2 kB 查看哈希)

上传时间

构建分布

keel_telegram_bot-1.3.1-py3-none-any.whl (34.3 kB 查看哈希)

上传时间 Python 3

由以下机构支持