A Telegram RSS bot that cares about your reading experience
aerich
0.7.2: A breaking change introduced in aerich
(a dependency of RSStT) 0.7.x has prevented RSStT from upgrading it for a long time. A lot of effort has been made, so the migration is expected to be seamless and shouldn't break anything. However, it is encouraged to make a database backup before upgrading RSStT. If you encounter any issues due to the migration, please file a bug report./set
or /set_default
, hashtags from posts (feed entries), merged with the custom hashtags of the feed, will be added to the message. The term "hashtags from post" refers to <category>
elements in RSS <item>
or Atom <entry>
. This feature is disabled by default. Thanks @maooyer for their first contribution in #449.--help
to the script to see a detailed usage guide._
(underscore) when setting custom hashtags.aerich
0.7.2:aerich
(RSStT 的一个依赖项) 0.7.x 中引入的一个重大变更使 RSStT 长期以来无法升级它。已经作出了很多努力,所以迁移预期为无缝的,且不应该造成任何破坏。但是,建议在升级 RSStT 之前进行数据库备份。如果您因迁移而遇到任何问题,请提交错误报告。/set
或 /set_default
中启用,来自文章 (源条目) 的 hashtag,在与源的自定义 hashtag 合并后,将被添加到消息中。术语“来自文章的 hashtag”指的是 RSS <item>
或 Atom <entry>
中的 <category>
元素。此功能默认禁用。感谢 @maooyer 在 #449 中作出的初次贡献。--help
传递给脚本以查看详细的使用指南。_
(下划线)。wsrv.nl
(environment variable IMAGES_WESERV_NL
) or media relay server (environment variable IMG_RELAY_SERVER
). Thanks #431 for inspiration.MANAGER
now accepts a single user ID as well as a list separated by ;
, ,
, (space)
, (linebreak)
, or (tab)
. Each user in the list will be able to manage the bot equally.ERROR_LOGGING_CHAT
, accepting a single user/channel/group ID, has been added. If set, these error logs will be sent to the specified chat. Otherwise, the first user ID in MANAGER
will be selected as default.<li>
: Strip whitespaces (including linebreaks) in <li>
(list item) to improve readability. Only the leading and trailing whitespaces (including linebreaks) are stripped.ReplyKeyboardForceReply
to True
in groups. Previously, it was also set in private chats. See also "Bug fixes" below./sub
) "force reply" not cleared: Both /sub
and /import
set ReplyKeyboardForceReply
to True
to force the user to reply to the bot. However, due to a bug of Telegram, it keeps effective even if the user has made a reply, making the reply bar always reappear. Previously, a workaround has been applied to /import
by deleting the prompt message containing ReplyKeyboardForceReply
after the user has made a reply (see also #170). But /sub
was forgotten at that time. Now the workaround has been applied to /sub
too./lang
unavailable: Fix a bug preventing users from using the /lang
command "remotely".wsrv.nl
(环境变量 IMAGES_WESERV_NL
) 或媒体反代服务器 (环境变量 IMG_RELAY_SERVER
) 进行代理。感谢 #431 的启发。MANAGER
现在既接受单个用户 ID,也接受由 ;
, ,
, (空格)
, (换行)
或 (制表符)
分隔的列表。列表中的每个用户都可以平等地管理机器人。ERROR_LOGGING_CHAT
,其接受单个用户/频道/群组 ID。如果被设置,这些错误日志将被发送到指定的会话。否则,将选择 MANAGER
中的第一个用户 ID 作为默认值。<li>
中的表层空格: 除去 <li>
(列表项) 中的表层空格 (包括换行符) 以提高可读性。只有前导和尾随空格 (包括换行符) 被除去。ReplyKeyboardForceReply
为 True
。先前,它也在私聊中被设置。另请参阅下面的“Bug 修复”。/sub
) “强制回复”未被清除: /sub
和 /import
都将 ReplyKeyboardForceReply
设置为 True
以强制用户回复 bot。然而,由于 Telegram 的一个 bug,即使用户已经回复过了,它仍然有效,导致回复栏总是重新出现。先前,通过在用户回复后删除包含 ReplyKeyboardForceReply
的提示消息,为 /import
应用了变通解决方案 (另请参阅 #170)。但是 /sub
在那时被遗忘了。现在,这个变通解决方案也被应用到了 /sub
上。/lang
不可用:修复阻止用户“远程”使用 /lang
命令的错误。EXECUTOR_NICENESS_INCREMENT
.<menu>
and <dir>
are treated the same as <ul>
(unordered list). In addition, orphan <li>
(list item) without a valid list parent tag are no longer ignored but treated as an item in an single unordered list.EXECUTOR_NICENESS_INCREMENT
调节。<menu>
和 <dir>
被视为 <ul>
(无序列表)。此外,没有有效列表父标签的孤立 <li>
(列表项) 不再被忽略,而是被视为单个无序列表中的一个项目。wsrv.nl
via relay: Try to use wsrv.nl
(environment variable IMAGES_WESERV_NL
) via the media relay server (environment variable IMG_RELAY_SERVER
). This is a workaround for images from domains/TLDs banned by wsrv.nl
or CDNs that ban wsrv.nl
. It can hopefully reduce the frequency of seeing "invalid media" in messages since RSStT uses wsrv.nl
heavily to convert images into formats accepted by Telegram DCs. See also #369.isal
has been added to slightly improve the performance of entry hashing./test
unavailable: Fix a bug preventing the bot manager from using the /test
command "remotely".wsrv.nl
to be sometimes too big (exceed the 5MiB limitation of Telegram DC) to send.Content-Length
header to be fully fetched regardless of the fetch limit.wsrv.nl
: 尝试通过媒体反代服务器 (环境变量 IMG_RELAY_SERVER
) 使用 wsrv.nl
(环境变量 IMAGES_WESERV_NL
)。这是对那些来自被 wsrv.nl
封禁的域名或将 wsrv.nl
封禁的 CDN 的图片的变通解决方案。考虑到 RSStT 大量使用 wsrv.nl
将图片转换为 Telegram DC 所接受的格式,这有望减少在消息中见到 "Invalid media" 的频率。另请参阅 #369。isal
用于稍微提升条目散列的性能。/test
不可用:修复阻止 bot 管理员“远程”使用 /test
命令的错误。wsrv.nl
调节尺寸后的图像有时候仍然太大(超过 Telegram DC 的 5MiB 限制)以至于无法发送。Content-Length
标头的 WEBP 被完全获取,而没有考虑获取限制的错误。aiohttp
does. This improves performance (reduce load average by ~40%) and reduces memory usage.<blockquote>
is now rendered as a native Telegram blockquote rather than a text block wrapped with horizontal rules.<pre>
is now rendered as a native Telegram code block with syntax highlighting, as long as the language is specified in the class
attribute./lang
and /test
as "remote" commands: /lang
and /test
are now recognized as "remote" commands, which means you can use them in the private chat to make the operation actually apply to the channel/group you've specified in the command. Note: /test
is only available to the bot manager./user_info
UX enhancement: /user_info
now has a better UX. Note: /user_info
is only available to the bot manager.aiohttp
那样重用 SSL 上下文。这将提高性能(将平均负载降低约 40%)并减少内存使用量。<blockquote>
现在被渲染为原生的 Telegram 块状引用,取代用横线包裹的文本块。class
属性中指定了语言,<pre>
现在会呈现为带有语法高亮的 Telegram 原生代码块。/lang
和 /test
作为“远程”命令:/lang
和 /test
现在被认定为“远程”命令,这意味着您可以在私聊中使用它们,但使操作实际应用于您在命令中指定的频道/群组。注意:/test
仅适用于 bot 管理员。/user_info
UX 增强: /user_info
现在有了更好的 UX。注意:/user_info
仅对 bot 管理员有效。This is a long-awaited release. Nice to meet you again in the changelog! This is the last release that supports Python 3.7, and there will not be any patch version for the v2.3.x series. Any fixes will only be applied to the next release, which will bump the minimum Python version requirement to 3.9.
fuzzwuzz
to C-extension rapidfuzz
and a lot of performance tuning.jemalloc
.MULTIPROCESSING
is set to 1
, multiple processes will be started. The number of processes is equal to the cores of CPU, but the maximum is 3. One is the main process, the others (if any) are used to parse RSS feeds, etc. Note that it is only valid when there are more than 1 CPU core, otherwise only 1 process (main process) will be started. It may help improve the performance on multicore CPUs but consumes more memory. Usually you don't need to enable it. However, if there are tons of subscriptions or your VPS comes with multiple cores but the performance of each is poor, you may want to enable this feature.uvloop
) bug that causes the bot to use too much bandwidth. Compared to previous releases, it cuts down up to 75% bandwidth usage when uvloop
enabled./set_option
command, you can set user_sub_limit
and channel_or_group_sub_limit
. To check or set the limit of a specific user/channel/group, use the /user_info
command.<q>
tag as quotation marks: A <q>
tag is now converted to quotation marks (<q>I am a quote,</q> said Q.
-> “I am a quote,” said Q.
).@bot_username
), causing the bot not to respond. Now the bot will ignore the inline query header and respond to commands correctly.sr-only
elements: Drop sr-only
elements from the RSS feed. They are only for screen readers and should not be rendered.More unmentioned minor bugs have been fixed in the release. The changelog does not include all the changes. For more details, please refer to the compare view.
这是一个期待已久的版本。很高兴在变更日志中再次相遇!这是支持 Python 3.7 的最后一个版本,v2.3.x 系列不会有任何补丁版本。任何修复都将只应用于下一个版本,且下一个版本将使 Python 的最低版本要求提高到 3.9。
fuzzwuzz
(纯 Python) 迁移到 rapidfuzz
(C 扩展) 以及大量的性能调校。jemalloc
降低内存消耗,提高内存分配性能。MULTIPROCESSING
设置为 1
,将启动多个进程。进程的数量将等于 CPU 核心数,但最大值为 3。一个是主进程,其它进程(如果有的话)用于解析 RSS 提要等。请注意,只有当有 1 个以上的 CPU 核心时,该选项才有效,否则将只启动 1 个进程(主进程)。它可能有助于在多核 CPU 上提升性能,但会消耗更多内存。通常你不需要启用它。但是,如果有大量订阅,或者您的 VPS 有多个核心,但每个核心的性能都很差,您可能需要启用此功能。uvloop
)的 bug,这导致 bot 使用过多的带宽。与之前的版本相比,当启用 uvloop
时,可以减少高达 75% 的带宽使用。/set_option
命令,可以设置 user_sub_limit
(普通用户的订阅数量限制) 和 channel_or_group_sub_limit
(频道或群组的订阅数量限制)。要为特定用户/频道/群组检查或设置订阅数量限制,请使用 /user_info
命令。<q>
标签转换为引号: <q>
标签现在会被转换为引号(<q>I am a quote,</q> said Q.
-> “I am a quote,” said Q.
)。@bot_username
) 发送,导致 bot 没有响应。现在, bot 将忽略 inline query header 并正确响应命令。sr-only
元素:从 RSS 源中删除 sr_only
元素。它们仅用于屏幕阅读器,不应被渲染。更多未提及的小 bug 已在该版本被修复。变更日志不包括所有变更。有关更多详细信息,请参阅比较视图。
pip install rsstt
. For more details, refer to the Deployment Guide.TABLE_TO_IMAGE
to be set to 1
, and CJK fonts to be installed. Please do note that the converter is not perfect, cannot handle rich-text formatting, may not work for all HTML tables, and can potentially lead to a higher performance cost and longer processing time.id
, Bahasa Indonesia) translation has been added..env.sample
: A sample .env
file has been added.tr
, Türkçe) translation has been updated.git
outside of the shell.misfire_grace_time
to 10s to avoid monitor jobs being misfired because of high load.pip install rsstt
来安装。详细信息请参阅部署指南.TABLE_TO_IMAGE
设置为 1
,并且需要安装 CJK 字体。请注意,转换器不是完美的,不能处理富文本格式,可能无法处理所有的 HTML 表格,并可能会导致更高的性能成本和更长的处理时间。id
, Bahasa Indonesia) 的翻译。.env.sample
: 增加了范例 .env
文件。tr
, Türkçe) 的翻译。git
。misfire_grace_time
至 10s 以避免监视任务由于高负载未能启动。/sub @username https://exmaple.com
or /sub -10010000000000 https://exmaple.com
. (@username
is the channel/group's username, @
is required; -10010000000000
is the channel/group's ID, it must start with -100
)/user_info
command. In this way, the bot manager can set who (user/channel/group) can use the bot, even if the multi-user mode is disabled.<div>
: The bot will now ensure that each <div>
tag takes up a whole line.cchardet
is not robust enough to handle all feeds. Now the bot will try to detect the encoding of the webpage according to the XML encoding declaration. Also, if cchardet
returns a not-supported encoding, the bot will try to decode the webpage using UTF-8. Any character that cannot be decoded will be replaced with �
./sub @username https://exmaple.com
或 /sub -10010000000000 https://exmaple.com
的格式发送命令。(@username
是频道/群组的用户名, @
是不可缺少的; -10010000000000
是频道/群组的 ID, 必须以 -100
开头)/user_info
命令来管理 bot 用户 (用户/频道/群组) 的权限。这样管理员就可以设置谁可以使用 bot,即使禁用了多用户模式。<div>
: Bot 现在会确保每个 <div>
标签都占据一整行。cchardet
并不足够健壮以处理所有源。现在 bot 会尝试从 XML 编码声明中探测网页编码。同时,如果 cchardet
返回了不支持的编码,bot 会尝试使用 UTF-8 来解码网页。任何无法被解码的字符都会被替换为 �
。Official public bot @RSStT_Bot is always using the dev
branch. If you are using it, you may have noticed the new features. Since new commands are added, please use /lang
command once again and select your language to let the bot update your command list.
/setinline
, select your bot, and reply with an inline placeholder you like. For example, @RSStT_Bot is using Please input a command to continue...
./set
command now gains its full power. You can control media or any metadata to be displayed or not. Adding your custom hashtags and setting your custom subscription title are all possible, but the inline mode is required to be enabled. Read the detailed description of formatting settings in the Formatting Settings Guidebook./set_default
to set your default formatting settings. It applies to all your new subscriptions and if you like, you can make existing subscriptions use them. It is useful if you want to set similar settings for most of your subscriptions.
<audio>
support: The bot can now extract audio from post content. Enjoy listening to podcasts!srcset
): The bot can now fall back an image to its alternative images (<img srcset="...">
, if any) when the image is invalid.<video><source>...</video>
, if any) or its poster (<video poster="...">
, if any) when the video is invalid./unsub_all
confirmation and backup: When you unsubscribe from all feeds, the bot will ask you to confirm and send you a backup.Cancel
button./test
formatting: The /test
command now uses the user's default formatting settings or the formatting settings of the feed (if subscribed). (Note: only the bot manager can use this command.)官方的公开 bot @RSStT_Bot 一直使用 dev
分支。如果你正在使用它,你可能已经注意到新功能了。由于添加了新的命令,请使用 /lang
命令再一次选择你的语言,让 bot 更新你的命令列表。
/setinline
,选择你的 bot,并回复一个你喜欢的 inline 占位符。例如,@RSStT_Bot 使用的是 Please input a command to continue...
。/set
命令可以发挥它的全部威力了。你可以控制媒体或者任何元数据是否显示,还可以添加自定义 hashtag 和设置自定义订阅标题。但这些都需要启用 inline 模式。请阅读 格式设置指南 了解格式设置的详细信息。/set_default
命令来设置你的默认格式化设置。这将应用到你的所有新订阅,如果你喜欢,你也可以让现有订阅也使用它。如果你想给大多数你的订阅应用相似的设置,这是非常有用的。
<audio>
支持: Bot 现在可以从文章中提取音频。来享受听音频节目吧!srcset
): Bot 现在可以在图片不合法时回落到替代图片 (<img srcset="...">
,如果有)。<video><source>...</video>
,如果有) 或它的封面 (<video poster="...">
,如果有)。/unsub_all
确认: 当你退订所有订阅时,bot 会向你确认并发送备份。取消
按钮取消。/test
格式化: /test
命令现在会使用用户的默认格式化设置或者订阅的格式化设置 (如果已被订阅)。 (注: 只有 bot 管理员可以使用这个命令。)Contributors: @Rongronggg9 @NekoAria
Official public bot: @RSStT_Bot
This is a major release. It introduces some major breaking changes. You must migrate to the new version manually.
PLEASE READ THE MIGRATION GUIDE BEFORE UPDATING!
CHATID
and DELAY
are deprecated and of no use.
MULTIUSER
is set to 0
).PROXY_BYPASS_PRIVATE
is set, the bot will bypass proxy for private IPs. And will bypass proxy for domains listed in env variable PROXY_BYPASS_DOMAINS
.官方的公开 bot: @RSStT_Bot
这是一个重大的发布。它引入了一些重大变更,因此迁移至新版本需要手动完成。
更新前请务必阅读迁移指南!
CHATID
和 DELAY
已经被弃用且不再有效。
MULTIUSER
设置为 0
)。PROXY_BYPASS_PRIVATE
,bot 会为私有网络绕过代理。在环境变量 PROXY_BYPASS_DOMAINS
中列出的域名也会被绕过。