一、flowerss bot特点:
常见的 rss bot 该有的功能
支持 telegram 应用内 instant view
支持为 group 和 channel 订阅 rss 消息
二、安装必须的组件
1、
yum install make gcc git -y
2、安装golang
wget https://dl.google.com/go/go1.12.6.linux-amd64.tar.gz
tar -c /usr/local -xzf go1.12.6.linux-amd64.tar.gz
echo 'export path=$path:/usr/local/go/bin' >>/etc/profile
source /etc/profile
三、安装flowerss bot
1、
git clone https://github.com/indes/flowerss-bot && cd flowerss-bot
make build
2、修改配置文件
根目录下 config.yml
bot_token:必填,从 @botfather 申请
update_interval:监控间隔,分钟为单位
3、运行
./flowerss-bot
配置说明:
配置项 | 含义 | 是否必填 |
---|---|---|
bot_token | telegram bot token | 必填 |
telegraph_token | telegraph token, 用于转存原文到 telegraph | 可忽略(不转存原文到 telegraph ) |
preview_text | 纯文字预览字数(不借助telegraph) | 可忽略(默认0, 0为禁用) |
disable_web_page_preview | 是否禁用 web 页面预览 | 可忽略(默认 false, true 为禁用) |
update_interval | rss 源扫描间隔(分钟) | 可忽略(默认 10) |
error_threshold | 源最大出错次数 | 可忽略(默认 100) |
socks5 | 用于无法正常 telegram api 的环境 | 可忽略(能正常连接上 telegram api 服务器) |
mysql | mysql 数据库配置 | 可忽略(使用 sqlite ) |
sqlite | sqlite 配置 | 可忽略(已配置mysql时,该项失效) |
telegram.endpoint | 自定义telegram bot api url | 可忽略(使用默认api url) |
四、使用flowerss bot
1、命令:
/sub [url] 订阅(url 为可选)
/unsub [url] 取消订阅(url 为可选)
/list 查看当前订阅
/set 设置订阅
/setfeedtag [sub id] [tag1] [tag2] 设置订阅标签(最多设置三个tag,以空格分割)
/import 导入 opml 文件
/export 导出 opml 文件
/unsuball 取消所有订阅
/help 帮助
2、telagram channel 订阅使用方法
将 bot 添加为 channel 管理员
发送相关命令给 bot
channel 订阅支持的命令:
/[email protected] feed链接 订阅
/[email protected] feed链接 取消订阅
/[email protected] 查看当前订阅
/[email protected] 取消所有订阅
channelid 只有设置为 public channel 才有。如果是 private channel,可以暂时设置为 public,订阅完成后改为 private,不影响 bot 推送消息。
flowerss-bot开源页面: