diff --git a/apps/rss-to-telegram-bot/2.2.1/.env.sample b/apps/rss-to-telegram-bot/2.2.1/.env.sample new file mode 100644 index 00000000..ee9b5dd1 --- /dev/null +++ b/apps/rss-to-telegram-bot/2.2.1/.env.sample @@ -0,0 +1,15 @@ +BOT_TOKEN="" +CONTAINER_NAME="rss-to-telegram-bot" +DATA_PATH="./data" +PANEL_APP_PORT_HTTP="40054" +PROXY_SERVER="socks5://wgcfd:1080" +TELEGRAM_USER_ID="" +TELEGRAPH_API_TOKEN1="" +TELEGRAPH_API_TOKEN2="" +TELEGRAPH_API_TOKEN3="" +TELEGRAPH_API_TOKEN4="" +TELEGRAPH_API_TOKEN5="" +TELEGRAPH_API_TOKEN6="" +TG_API_HASH="" +TG_API_ID="" +USERAGENT="Mozilla/5.0 (Android 12; Mobile; rv:68.0) Gecko/68.0 Firefox/96.0" diff --git a/apps/rss-to-telegram-bot/2.2.1/data.yml b/apps/rss-to-telegram-bot/2.2.1/data.yml new file mode 100644 index 00000000..6530fb3a --- /dev/null +++ b/apps/rss-to-telegram-bot/2.2.1/data.yml @@ -0,0 +1,101 @@ +additionalProperties: + formFields: + - default: 40054 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: ./data + edit: true + envKey: DATA_PATH + labelEn: Data folder path + labelZh: 数据文件夹路径 + required: true + type: text + - default: "" + edit: true + envKey: BOT_TOKEN + labelEn: Telegram Bot token (@BotFather) + labelZh: Telegram Bot token (@BotFather) + required: true + type: text + - default: "" + edit: true + envKey: TELEGRAM_USER_ID + labelEn: Telegram user id (@userinfobot) + labelZh: Telegram用户ID (@userinfobot) + required: true + type: text + - default: "" + edit: true + envKey: TELEGRAPH_API_TOKEN1 + labelEn: Telegram api token 1 + labelZh: Telegram api token 1 + required: true + type: text + - default: "" + edit: true + envKey: TELEGRAPH_API_TOKEN2 + labelEn: Telegram api token 2 + labelZh: Telegram api token 2 + required: true + type: text + - default: "" + edit: true + envKey: TELEGRAPH_API_TOKEN3 + labelEn: Telegram api token 3 + labelZh: Telegram api token 3 + required: true + type: text + - default: "" + edit: true + envKey: TELEGRAPH_API_TOKEN4 + labelEn: Telegram api token 4 + labelZh: Telegram api token 4 + required: true + type: text + - default: "" + edit: true + envKey: TELEGRAPH_API_TOKEN5 + labelEn: Telegram api token 5 + labelZh: Telegram api token 5 + required: true + type: text + - default: "" + edit: true + envKey: TELEGRAPH_API_TOKEN6 + labelEn: Telegram api token 6 + labelZh: Telegram api token 6 + required: true + type: text + - default: "" + edit: true + envKey: TG_API_ID + labelEn: Telegram api id (https://core.telegram.org/api/obtaining_api_id) + labelZh: Telegram api id (https://core.telegram.org/api/obtaining_api_id) + required: false + type: text + - default: "" + edit: true + envKey: TG_API_HASH + labelEn: Telegram api hash + labelZh: Telegram api hash + required: false + type: text + - default: "Mozilla/5.0 (Android 12; Mobile; rv:68.0) Gecko/68.0 Firefox/96.0" + edit: true + envKey: USERAGENT + labelEn: User-Agent + labelZh: User-Agent + required: false + type: text + - default: "" + edit: true + envKey: PROXY_SERVER + labelEn: SOCKS5 Proxy (socks5://172.17.0.1:1080) + labelZh: SOCKS5代理 (socks5://172.17.0.1:1080) + required: false + type: text diff --git a/apps/rss-to-telegram-bot/2.2.1/docker-compose.yml b/apps/rss-to-telegram-bot/2.2.1/docker-compose.yml new file mode 100644 index 00000000..6ae7ce55 --- /dev/null +++ b/apps/rss-to-telegram-bot/2.2.1/docker-compose.yml @@ -0,0 +1,48 @@ +version: '3' +services: + rsstgbot: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + volumes: + - "${DATA_PATH}:/app/config" + environment: + - TOKEN=${BOT_TOKEN} # get it from @BotFather + - MANAGER=${TELEGRAM_USER_ID} # get it from @userinfobot + - TELEGRAPH_TOKEN= + ${TELEGRAPH_API_TOKEN1} + ${TELEGRAPH_API_TOKEN2} + ${TELEGRAPH_API_TOKEN3} + ${TELEGRAPH_API_TOKEN4} + ${TELEGRAPH_API_TOKEN5} + ${TELEGRAPH_API_TOKEN6} + - MULTIUSER=1 # default: 1 + - CRON_SECOND=0 # 0-59, default: 0 + #- DATABASE_URL=postgres://username:password@host:port/db_name # default: sqlite://path/to/config/db.sqlite3 + - API_ID=${TG_API_ID} # get it from https://core.telegram.org/api/obtaining_api_id + - API_HASH=${TG_API_HASH} # get it from https://core.telegram.org/api/obtaining_api_id + #- IMG_RELAY_SERVER=https://wsrv.nl/?url= # default: https://rsstt-img-relay.rongrong.workers.dev/ + #- IMAGES_WESERV_NL=https://t0.nl/ # default: https://wsrv.nl/ + - USER_AGENT=${USERAGENT} # default: RSStT/2.2 RSS Reader + #- IPV6_PRIOR=1 # default: 0 + - T_PROXY=${PROXY_SERVER} # Proxy used to connect to the Telegram API + - R_PROXY=${PROXY_SERVER} # Proxy used to fetch feeds + #- PROXY_BYPASS_PRIVATE=1 # default: 0 + #- PROXY_BYPASS_DOMAINS=example.com;example.net + - HTTP_TIMEOUT=30 # default: 12 + - HTTP_CONCURRENCY=1024 # default: 1024 + - HTTP_CONCURRENCY_PER_HOST=16 # default: 16 + #- TABLE_TO_IMAGE=1 # default: 0 + #- TRAFFIC_SAVING=1 # default: 0 + #- LAZY_MEDIA_VALIDATION=1 # default: 0 + #- MANAGER_PRIVILEGED=1 # default: 0 + #- NO_UVLOOP=1 # default: 0 + #- MULTIPROCESSING=1 # default: 0 + #- DEBUG=1 # debug logging, default: 0 + image: rongronggg9/rss-to-telegram:2.2.1 + labels: + createdBy: Apps +networks: + 1panel-network: + external: true \ No newline at end of file diff --git a/apps/rss-to-telegram-bot/README.md b/apps/rss-to-telegram-bot/README.md new file mode 100644 index 00000000..9568dd3f --- /dev/null +++ b/apps/rss-to-telegram-bot/README.md @@ -0,0 +1,105 @@ +# 使用介绍 +API access tokens 获取,刷新一次获取一个,按需修改 + +``` +https://api.telegra.ph/createAccount?short_name=RSStT&author_name=Generated%20by%20RSStT&author_url=https%3A%2F%2Fgithub.com%2FRongronggg9%2FRSS-to-Telegram-Bot +``` +这是一个链接,指向`Telegram Telegraph API`的一个特定端点用于创建`Telegraph`帐户。它的作用是用于访问`Telegram Telegraph`服务并创建一个名为"RSStT"的帐户,其中包含有关帐户作者的信息,例如"Generated by RSStT"和作者URL为"https://github.com/Rongronggg9/RSS-to-Telegram-Bot"。 + +# 原始相关 + +RSStT icon + +# [RSS to Telegram Bot](https://t.me/RSStT_Bot) + +**关心你的阅读体验的 Telegram RSS 机器人** + +[English README](README.md) + +[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/Rongronggg9/RSS-to-Telegram-Bot?logo=git&label=commit)](https://github.com/Rongronggg9/RSS-to-Telegram-Bot/commits) +[![Translating status](https://img.shields.io/weblate/progress/rss-to-telegram-bot?logo=weblate&color=informational)](https://hosted.weblate.org/engage/rss-to-telegram-bot/) +[![Code quality](https://img.shields.io/codefactor/grade/github/Rongronggg9/RSS-to-Telegram-Bot?logo=codefactor)](https://www.codefactor.io/repository/github/rongronggg9/rss-to-telegram-bot) +[![GitHub stars](https://img.shields.io/github/stars/Rongronggg9/Rss-to-Telegram-Bot?style=social)](https://github.com/Rongronggg9/RSS-to-Telegram-Bot/stargazers) +[![GitHub forks](https://img.shields.io/github/forks/Rongronggg9/RSS-to-Telegram-Bot?style=social)](https://github.com/Rongronggg9/RSS-to-Telegram-Bot/fork) + +[![Telegram bot](https://img.shields.io/badge/bot-%40RSStT__Bot-229ed9?logo=telegram&style=for-the-badge)](https://t.me/RSStT_Bot) +[![Telegram group](https://img.shields.io/badge/chat-%40RSStT__Group-229ed9?logo=telegram&style=for-the-badge)](https://t.me/RSStT_Group) +[![Telegram channel](https://img.shields.io/badge/channel-%40RSStT__Channel-229ed9?logo=telegram&style=for-the-badge)](https://t.me/RSStT_Channel) + +| [更新日志] | [FAQ] | [文档] | [使用 RSStT 的频道] | +|:--------:|-------|:------:|:--------------:| + +[更新日志]: https://github.com/Rongronggg9/RSS-to-Telegram-Bot/raw/dev/docs/CHANGELOG.zh.md + +[FAQ]: https://github.com/Rongronggg9/RSS-to-Telegram-Bot/raw/dev/docs/FAQ.zh.md + +[文档]: docs + +[使用 RSStT 的频道]: https://github.com/Rongronggg9/RSS-to-Telegram-Bot/raw/dev/docs/channels-using-rsstt.md + +## 亮点 + +- 多用户 +- 国际化 + - 英语、中文、粤语、意大利语还有[更多](https://github.com/Rongronggg9/RSS-to-Telegram-Bot/raw/dev/docs/translation-guide.md)! +- RSS 源的文章内容可被发送至 Telegram + - 保持富文本格式 + - 保持媒体文件 (可自定义) + - 在文章内容或者 enclosure 里的图片、视频、音频;和在文章 enclosure 里的文档 + - 长图会作为文件发送,防止 Telegram 将它压缩得不可读 + - 丢弃烦人的图标,它们破坏了阅读体验 + - 自动替换 emoji shortcodes 为 emoji + - 自动替换满足某些特征的表情图片为 emoji 或其描述文本 + - 自动判断 RSS 源的标题是否为自动填充,并自动选择是否略去标题 (可自定义) + - 自动显示作者名 (可自定义) + - 自动切分超长消息 + - 如果配置了 Telegraph,消息会通过 Telegraph 发出 (可自定义) +- [丰富的自定义格式设定](https://github.com/Rongronggg9/RSS-to-Telegram-Bot/raw/dev/docs/formatting-settings.md) + - Hashtag、自定义标题,等等 +- 为 Telegram 和 RSS 源配置独立的代理设置 +- OPML 导入和导出 (保持自定义标题) +- 自定义订阅 +- 优化的性能 (参见 [FAQ](https://github.com/Rongronggg9/RSS-to-Telegram-Bot/raw/dev/docs/FAQ.zh.md#q-bot-的性能怎么样)) +- 用户友好 +- HTTP 缓存 + +## 部署 + +[![PyPI](https://img.shields.io/pypi/v/rsstt?logo=pypi&logoColor=white)](https://pypi.org/project/rsstt/) +[![PyPI publish status](https://img.shields.io/github/workflow/status/Rongronggg9/RSS-to-Telegram-Bot/Publish%20to%20PyPI?label=publish&logo=pypi&logoColor=white)](https://github.com/Rongronggg9/RSS-to-Telegram-Bot/actions/workflows/publish-to-pypi.yml) +[![PyPI - Downloads](https://img.shields.io/pypi/dm/rsstt?logo=pypi&logoColor=white)](https://pypi.org/project/rsstt/) +[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/rsstt?logo=python&label=&labelColor=white)](https://www.python.org) + +[![Docker Image Size (tag)](https://img.shields.io/docker/image-size/rongronggg9/rss-to-telegram/latest?logo=docker)](https://hub.docker.com/r/rongronggg9/rss-to-telegram) +[![Build status (master)](https://img.shields.io/github/workflow/status/Rongronggg9/RSS-to-Telegram-Bot/Publish%20Docker%20image/master?label=build&logo=docker)](https://github.com/Rongronggg9/RSS-to-Telegram-Bot/actions/workflows/publish-docker-image.yml?query=branch%3Amaster) +[![Build status (dev)](https://img.shields.io/github/workflow/status/Rongronggg9/RSS-to-Telegram-Bot/Publish%20Docker%20image/dev?label=build%20%28dev%29&logo=docker)](https://github.com/Rongronggg9/RSS-to-Telegram-Bot/actions/workflows/publish-docker-image.yml?query=branch%3Adev) +[![Docker pulls](https://img.shields.io/docker/pulls/rongronggg9/rss-to-telegram?label=pulls&logo=docker&color=informational)](https://hub.docker.com/r/rongronggg9/rss-to-telegram) + +部署 RSStT 实例非常简单。最推荐的部署方式是 Docker Compose: 它适合几乎所有 VPS。[Railway.app](https://railway.app) (一个 PaaS 平台) 也得到了官方支持。您也可以使用 pip 从 PyPI (跟踪 `master` 分支) 或 TestPyPI (跟踪最新的 `dev` 分支) 安装 RSStT。对于开发人员或有经验的用户,从源代码直接运行也是一个选项。 + +Deploy on Railway + +详情请参阅[部署指南](https://github.com/Rongronggg9/RSS-to-Telegram-Bot/raw/dev/docs/deployment-guide.md)。 + +## 翻译 + +在[这里](https://github.com/Rongronggg9/RSS-to-Telegram-Bot/raw/dev/docs/translation-guide.md)阅读翻译指南。 + +你可以通过 [Hosted Weblate](https://hosted.weblate.org/projects/rss-to-telegram-bot/) 帮助翻译这个 bot。特别感谢他们为自由项目提供的免费托管服务! + + + +## 使用公共 bot + +[公共 bot](https://t.me/RSStT_Bot) 没有服务保障。我会尽我所能维护它,但不能保证它永远完美运作。同时,你应该遵循“公平使用”,避免订阅过多 RSS 源。 +如果你在频道里使用[公共 bot](https://t.me/RSStT_Bot) ,请考虑在频道简介 (或置顶消息) 里提及这个 bot (或这个项目),来让更多人了解本项目。这不是强制的。 + +## 使用 RSStT 的频道 + +想要预览 RSStT 发送的消息的模样吗?这里有一个[使用 RSStT 的频道列表](https://github.com/Rongronggg9/RSS-to-Telegram-Bot/raw/dev/docs/channels-using-rsstt.md) + +## 许可证 + +本项目根据 [AGPLv3](LICENSE) 授权。严禁闭源的分发或机器人托管。如果你修改了代码并分发或托管它,请确保任何可以使用你的 bot 的用户都可以获得源代码 (通过在 [`src/i18n/__init__.py`](src/i18n/__init__.py) 中编辑仓库 URL)。 + +本仓库原是 [BoKKeR/RSS-to-Telegram-Bot](https://github.com/BoKKeR/RSS-to-Telegram-Bot) 的一个 fork。自本项目的早期开始,它们就已经是完全不同的项目了。 diff --git a/apps/rss-to-telegram-bot/data.yml b/apps/rss-to-telegram-bot/data.yml new file mode 100644 index 00000000..5e491abe --- /dev/null +++ b/apps/rss-to-telegram-bot/data.yml @@ -0,0 +1,20 @@ +name: RSS-to-Telegram-Bot +tags: + - 工具 +title: 关心你的阅读体验的 Telegram RSS 机器人 +type: 工具 +description: 关心你的阅读体验的 Telegram RSS 机器人 +additionalProperties: + key: rss-to-telegram-bot + name: RSS-to-Telegram-Bot + tags: + - Tool + shortDescZh: 关心你的阅读体验的 Telegram RSS 机器人 + shortDescEn: A Telegram RSS bot that cares about your reading experience + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://github.com/Rongronggg9/RSS-to-Telegram-Bot + github: https://github.com/Rongronggg9/RSS-to-Telegram-Bot + document: https://github.com/Rongronggg9/RSS-to-Telegram-Bot \ No newline at end of file diff --git a/apps/rss-to-telegram-bot/latest/.env.sample b/apps/rss-to-telegram-bot/latest/.env.sample new file mode 100644 index 00000000..ee9b5dd1 --- /dev/null +++ b/apps/rss-to-telegram-bot/latest/.env.sample @@ -0,0 +1,15 @@ +BOT_TOKEN="" +CONTAINER_NAME="rss-to-telegram-bot" +DATA_PATH="./data" +PANEL_APP_PORT_HTTP="40054" +PROXY_SERVER="socks5://wgcfd:1080" +TELEGRAM_USER_ID="" +TELEGRAPH_API_TOKEN1="" +TELEGRAPH_API_TOKEN2="" +TELEGRAPH_API_TOKEN3="" +TELEGRAPH_API_TOKEN4="" +TELEGRAPH_API_TOKEN5="" +TELEGRAPH_API_TOKEN6="" +TG_API_HASH="" +TG_API_ID="" +USERAGENT="Mozilla/5.0 (Android 12; Mobile; rv:68.0) Gecko/68.0 Firefox/96.0" diff --git a/apps/rss-to-telegram-bot/latest/data.yml b/apps/rss-to-telegram-bot/latest/data.yml new file mode 100644 index 00000000..6530fb3a --- /dev/null +++ b/apps/rss-to-telegram-bot/latest/data.yml @@ -0,0 +1,101 @@ +additionalProperties: + formFields: + - default: 40054 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: ./data + edit: true + envKey: DATA_PATH + labelEn: Data folder path + labelZh: 数据文件夹路径 + required: true + type: text + - default: "" + edit: true + envKey: BOT_TOKEN + labelEn: Telegram Bot token (@BotFather) + labelZh: Telegram Bot token (@BotFather) + required: true + type: text + - default: "" + edit: true + envKey: TELEGRAM_USER_ID + labelEn: Telegram user id (@userinfobot) + labelZh: Telegram用户ID (@userinfobot) + required: true + type: text + - default: "" + edit: true + envKey: TELEGRAPH_API_TOKEN1 + labelEn: Telegram api token 1 + labelZh: Telegram api token 1 + required: true + type: text + - default: "" + edit: true + envKey: TELEGRAPH_API_TOKEN2 + labelEn: Telegram api token 2 + labelZh: Telegram api token 2 + required: true + type: text + - default: "" + edit: true + envKey: TELEGRAPH_API_TOKEN3 + labelEn: Telegram api token 3 + labelZh: Telegram api token 3 + required: true + type: text + - default: "" + edit: true + envKey: TELEGRAPH_API_TOKEN4 + labelEn: Telegram api token 4 + labelZh: Telegram api token 4 + required: true + type: text + - default: "" + edit: true + envKey: TELEGRAPH_API_TOKEN5 + labelEn: Telegram api token 5 + labelZh: Telegram api token 5 + required: true + type: text + - default: "" + edit: true + envKey: TELEGRAPH_API_TOKEN6 + labelEn: Telegram api token 6 + labelZh: Telegram api token 6 + required: true + type: text + - default: "" + edit: true + envKey: TG_API_ID + labelEn: Telegram api id (https://core.telegram.org/api/obtaining_api_id) + labelZh: Telegram api id (https://core.telegram.org/api/obtaining_api_id) + required: false + type: text + - default: "" + edit: true + envKey: TG_API_HASH + labelEn: Telegram api hash + labelZh: Telegram api hash + required: false + type: text + - default: "Mozilla/5.0 (Android 12; Mobile; rv:68.0) Gecko/68.0 Firefox/96.0" + edit: true + envKey: USERAGENT + labelEn: User-Agent + labelZh: User-Agent + required: false + type: text + - default: "" + edit: true + envKey: PROXY_SERVER + labelEn: SOCKS5 Proxy (socks5://172.17.0.1:1080) + labelZh: SOCKS5代理 (socks5://172.17.0.1:1080) + required: false + type: text diff --git a/apps/rss-to-telegram-bot/latest/docker-compose.yml b/apps/rss-to-telegram-bot/latest/docker-compose.yml new file mode 100644 index 00000000..5381c27c --- /dev/null +++ b/apps/rss-to-telegram-bot/latest/docker-compose.yml @@ -0,0 +1,48 @@ +version: '3' +services: + rsstgbot: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + volumes: + - "${DATA_PATH}:/app/config" + environment: + - TOKEN=${BOT_TOKEN} # get it from @BotFather + - MANAGER=${TELEGRAM_USER_ID} # get it from @userinfobot + - TELEGRAPH_TOKEN= + ${TELEGRAPH_API_TOKEN1} + ${TELEGRAPH_API_TOKEN2} + ${TELEGRAPH_API_TOKEN3} + ${TELEGRAPH_API_TOKEN4} + ${TELEGRAPH_API_TOKEN5} + ${TELEGRAPH_API_TOKEN6} + - MULTIUSER=1 # default: 1 + - CRON_SECOND=0 # 0-59, default: 0 + #- DATABASE_URL=postgres://username:password@host:port/db_name # default: sqlite://path/to/config/db.sqlite3 + - API_ID=${TG_API_ID} # get it from https://core.telegram.org/api/obtaining_api_id + - API_HASH=${TG_API_HASH} # get it from https://core.telegram.org/api/obtaining_api_id + #- IMG_RELAY_SERVER=https://wsrv.nl/?url= # default: https://rsstt-img-relay.rongrong.workers.dev/ + #- IMAGES_WESERV_NL=https://t0.nl/ # default: https://wsrv.nl/ + - USER_AGENT=${USERAGENT} # default: RSStT/2.2 RSS Reader + #- IPV6_PRIOR=1 # default: 0 + - T_PROXY=${PROXY_SERVER} # Proxy used to connect to the Telegram API + - R_PROXY=${PROXY_SERVER} # Proxy used to fetch feeds + #- PROXY_BYPASS_PRIVATE=1 # default: 0 + #- PROXY_BYPASS_DOMAINS=example.com;example.net + - HTTP_TIMEOUT=30 # default: 12 + - HTTP_CONCURRENCY=1024 # default: 1024 + - HTTP_CONCURRENCY_PER_HOST=16 # default: 16 + #- TABLE_TO_IMAGE=1 # default: 0 + #- TRAFFIC_SAVING=1 # default: 0 + #- LAZY_MEDIA_VALIDATION=1 # default: 0 + #- MANAGER_PRIVILEGED=1 # default: 0 + #- NO_UVLOOP=1 # default: 0 + #- MULTIPROCESSING=1 # default: 0 + #- DEBUG=1 # debug logging, default: 0 + image: rongronggg9/rss-to-telegram:latest + labels: + createdBy: Apps +networks: + 1panel-network: + external: true \ No newline at end of file diff --git a/apps/rss-to-telegram-bot/logo.png b/apps/rss-to-telegram-bot/logo.png new file mode 100644 index 00000000..023fe72d Binary files /dev/null and b/apps/rss-to-telegram-bot/logo.png differ