github Rongronggg9/RSS-to-Telegram-Bot v2.1.0
Custom format, new l10n, improved media fallback, and more (v2.1.0)

latest releases: v2.6.0, v2.5.0, v2.4.1...
2 years ago

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.

BREAKING CHANGES

  • Inline mode is now required to be enabled due to new custom settings. Go to @BotFather, send /setinline, select your bot, and reply with an inline placeholder you like. For example, @RSStT_Bot is using Please input a command to continue....

Additions

Highlights

  • More custom formatting options: /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.
  • User's default formatting settings: Use /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.
    img.png
  • New l10n: Italian (Italiano), Turkish (Türkçe), Catalan (Català), and French (français). Feel like adding your language? Please read the translation guide here.
  • Feed sniffer: If you try to subscribe to a webpage instead of a feed, the bot will try to sniff the feed from the webpage. (Note: this only works if the webpage contains a feed link.)
  • Enclosure support: The bot can now extract enclosures from posts. Enjoy listening to podcasts or downloading attachments!
  • <audio> support: The bot can now extract audio from post content. Enjoy listening to podcasts!
  • Send long images as files: The bot can now send long images as files. This can prevent Telegram from compressing the image and making it unreadable.
  • OPML importing w/ custom title: You can now import subscriptions from OPML files, without losing your custom title. The bot will ask you if the bot should use the custom titles from the OPML file or not.
  • OPML exporting w/ custom title: You can now export your subscriptions to an OPML, without losing your custom title.

Other additions

  • Image validation for more formats: The bot can now judge the validity of non-JPEG images and fall back automatically to alternative images (if any) when the image is invalid.
  • Image fallback (srcset): The bot can now fall back an image to its alternative images (<img srcset="...">, if any) when the image is invalid.
  • Image fallback for pixiv: The bot can now fall back an image from pixiv to its other sizes when the image is invalid. (#41, @NekoAria)
  • Image fallback for all images: The bot can now use images.weserv.nl to fall back an invalid image to an image valid for Telegram API.
  • Video fallback: The bot can now fall back a video to its alternative videos (<video><source>...</video>, if any) or its poster (<video poster="...">, if any) when the video is invalid.
  • WEBP and SVG support: The bot can now use images.weserv.nl to convert WEBP and SVG to PNG, to make them compatible with Telegram API.
  • Media uploader: The bot now uploads media by using bare MTProto API calls, instead of using the effective method of telethon. This is to avoid unnecessary media fallback and to improve performance.

Enhancements

  • Page number: When a command needs to be paginated, the bot will show the current page number.
  • /unsub_all confirmation and backup: When you unsubscribe from all feeds, the bot will ask you to confirm and send you a backup.
  • Cancel: Some commands can be canceled by tapping on the Cancel button.
  • Custom monitor interval: You have now more choice of monitor interval, and if you want, you can set any interval you like (need the inline mode to be enabled, note that the bot manager can prevent ordinary users from setting a too-small value).
  • Deactivating reason: When a subscription is deactivated due to too many errors, the bot will tell you the reason.
  • Drop more icons: Some posts have annoying icons. The bot can now detect and drop more.
  • Monitor tasks order randomization: The order of the monitor tasks is randomized.
  • Retry when Telegram internal error occurs: When Telegram internal error occurs, the bot will retry to send the message.
  • Rewritten post parser: The post parser is rewritten to be more flexible and gain the ability to support custom formatting.
  • Rewritten rich-text splitter: The rich-text splitter is rewritten to be more stable, flexible and gain the ability to support custom formatting. This also prevents it from prematurely splitting the text.
  • Command speedup: Some commands are now faster.
  • /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.)
  • Minor enhancements

Bug fixes

  • Feed title not updated: When a feed updates its title, the bot will now update the title in the DB and send messages with the new title.
  • Content too long: Those commands that may contain long content now will be either shortened or paginated. If still too long, the bot will prompt you.
  • Too many entities: The bot now ensures that the number of formatting entities in a message is not greater than 100 (Telegram API limit), otherwise a split is made. This is to prevent messages from losing their formatting.
  • Potential deadlock: A potential deadlock issue has been fixed.
  • Improper white-space and linebreak policy: The bot can now avoid unintended white spaces and linebreaks in messages, especially for weird feeds. This also applies to the feed/post title and post author.
  • Minor bug fixes

自定义格式、新本地化、改进的媒体回落和更多 (v2.1.0)

官方的公开 bot @RSStT_Bot 一直使用 dev 分支。如果你正在使用它,你可能已经注意到新功能了。由于添加了新的命令,请使用 /lang 命令再一次选择你的语言,让 bot 更新你的命令列表。

重大变更

  • 由于加入了新的自定义设置,现在需要启用 inline 模式。请到 @BotFather ,发送 /setinline,选择你的 bot,并回复一个你喜欢的 inline 占位符。例如,@RSStT_Bot 使用的是 Please input a command to continue...

新特性

亮点

  • 更多自定义格式化选项: /set 命令可以发挥它的全部威力了。你可以控制媒体或者任何元数据是否显示,还可以添加自定义 hashtag 和设置自定义订阅标题。但这些都需要启用 inline 模式。请阅读 格式设置指南 了解格式设置的详细信息。
  • 用户默认格式化设置: 使用 /set_default 命令来设置你的默认格式化设置。这将应用到你的所有新订阅,如果你喜欢,你也可以让现有订阅也使用它。如果你想给大多数你的订阅应用相似的设置,这是非常有用的。
    img.png
  • 新本地化: 意大利语 (Italiano)、土耳其语 (Türkçe)、加泰罗尼亚语 (Català) 和法语 (français)。想要添加你的语言吗?请在这里阅读翻译指南。
  • RSS 源嗅探器: 如果你尝试订阅一个网页而不是 RSS 源,bot 将尝试从网页中提取 RSS 源。(注意:这仅在网页中包含 RSS 源链接时有效。)
  • Enclosure 支持: Bot 现在可以从文章的 enclosure 中提取附件。来享受听音频节目,或者下载附件吧!
  • <audio> 支持: Bot 现在可以从文章中提取音频。来享受听音频节目吧!
  • 长图作为文件发送: Bot 现在可以将长图作为文件发送,防止 Telegram 将它压缩得不可读。
  • 导入含自定义标题的 OPML 文件: 你现在可以从 OPML 文件导入订阅,而不会丢失你的自定义标题。Bot 将会询问你是否应该使用 OPML 文件中的自定义标题。
  • 导出含自定义标题的 OPML 文件: 你现在可以将你的订阅导出到 OPML 文件,而不会丢失你的自定义标题。

其他新特性

  • 合法化更多图片格式: Bot 现在可以判断非 JPEG 图片的合法性,并在不合法时回落到替代图片 (如果有)。
  • 图片回落 (srcset): Bot 现在可以在图片不合法时回落到替代图片 (<img srcset="...">,如果有)。
  • pixiv 图片回落: Bot 现在可以在 pixiv 图片不合法时回落到其他尺寸 (如果有)。 (#41, @NekoAria)
  • 为所有图片设计的图片回落: Bot 现在会使用 images.weserv.nl 来将不合法的图片回落成对于 Telegram API 合法的图片。
  • 视频回落: Bot 现在可以在视频不合法时回落到替代视频 (<video><source>...</video>,如果有) 或它的封面 (<video poster="...">,如果有)。
  • WEBP 和 SVG 支持: Bot 现在会使用 images.weserv.nl 来将 WEBP 和 SVG 转换成 PNG,使它们兼容于 Telegram API。
  • 媒体上传器: Bot 现在使用基本的 MTProto API 调用来上传媒体,而不是使用 telethon 提供的便捷方法。这有助于避免不必要的媒体回落和提升性能。

增强

  • 页码: 当命令需要分页时,bot 会显示当前页码。
  • /unsub_all 确认: 当你退订所有订阅时,bot 会向你确认并发送备份。
  • 取消: 一些命令可通过点击 取消 按钮取消。
  • 自定义监视间隔: 你现在有了更多的监视间隔可选。如果你想的话,也可以设置任何你喜欢的监视间隔 (需要启用 inline 模式,注意 bot 管理员可以禁止普通用户设置太短的监视间隔)
  • 停用原因: 当订阅由于出错太多次而被停用时,bot 会告知原因。
  • 丢弃更多图标: 一些文章有烦人的图标,bot 现在可以检测并丢弃更多。
  • 监视任务顺序随机化: 监视任务的顺序会被随机化。
  • 发生 Telegram 内部错误时重试: 当发生 Telegram 内部错误时,bot 会重试发送消息。
  • 重写的文章解析器: 文章解析器被重写,以使其更灵活,并获得支持自定义格式的能力。
  • 重写的富文本分割器: 富文本分割器被重写,以使其更灵活,并获得支持自定义格式的能力。这同样避免了它过早地分割文本。
  • 命令加速: 一些命令现在更快了。
  • /test 格式化: /test 命令现在会使用用户的默认格式化设置或者订阅的格式化设置 (如果已被订阅)。 (注: 只有 bot 管理员可以使用这个命令。)
  • 次要的增强

Bug 修复

  • RSS 源标题未更新: 当 RSS 源更新了它的标题时,bot 现在会更新在数据库里的标题并在发送消息时使用新标题。
  • 内容太长: 可能包含太长的内容的命令现在会被缩减或分页。如果还是太长,bot 会提示你。
  • 太多 entity: Bot 现在会确保消息中格式化 entity 的数量不多于 100 个 (Telegram API 限制),否则就进行分割。这有助于避免消息丢失格式化。
  • 潜在的死锁: 一个潜在的死锁问题被修复。
  • 不正确的空格和换行策略: Bot 现在会避免在消息中出现非预期的空格和换行,特别针对怪异的 RSS 源。这同样应用到 RSS 源/文章的标题和文章作者之上。
  • 次要的 bug 修复

Contributors: @Rongronggg9 @NekoAria

Don't miss a new RSS-to-Telegram-Bot release

NewReleases is sending notifications on new releases.