Rongronggg9 / RSS-to-Telegram-Bot

A Telegram RSS bot that cares about your reading experience
https://t.me/RSStT_Bot
GNU Affero General Public License v3.0
1.5k stars 277 forks source link

[Feature Request] use commands in CLI style #470

Open hellodword opened 4 months ago

hellodword commented 4 months ago

For example, I'm always using the set_title, but it seems that I cannot use the set_title with channels so I have to use /import or modify the database manually:

https://github.com/Rongronggg9/RSS-to-Telegram-Bot/blob/60f30a1be9adcf29c24d6049f538b480b268b73d/src/command/inner/customization.py#L249-L270

With enhanced /sub:

/sub --title "the title1" url1 url2 --title "the title3" --send_mode -1 url3

We can parse it as cli arguments.

What do you think?

hellodword commented 4 months ago

Sorry for using a wrong example, because I noticed that it's possible to use set_title with channel via /set @channel_name. But I want to keep this FR, because I think it's useful.

Rongronggg9 commented 4 months ago

With enhanced /sub:

/sub --title "the title1" url1 url2 --title "the title3" --send_mode -1 url3

Sounds convenient. It shouldn't be too hard to implement, but the complicated part is designing the layout of command arguments. I will consider it when I am spare.

E021ntox commented 1 month ago

@Rongronggg9 对比了很多rss工具,大佬你的工具还是最好用的。能不能考虑做一个脱离tg的版本?使用bark等方式推送,使用cli/web等方式管理

Rongronggg9 commented 1 month ago

@E021ntox

能不能考虑做一个脱离tg的版本?

RSStT 是我的早期作品,当初仅仅是自用,未有良好设计和抽象,基本维持这个状态至今,代码量已达 10k 行。鉴于此,用户介面与 Telegram (尤其是使用的库 telethon)高度耦合,迁移的工作量较大。数据库没有做多平台设计,也需要迁移。Feed 监控与文章格式化、媒体解析相关的部分倒是可以重用。

使用bark等方式推送

但是如果仅仅是用作这种推送形式,恐怕占据 RSStT 代码量半壁江山的文章格式化、媒体解析是用不上的,实在是杀鸡用牛刀了。

况且我没有任何苹果设备。

使用cli/web等方式管理

这相当于要补全 B/S 或 C/S 架构中的 Browser 或 Client。现在,相当于是 Telegram 来充当 Client。于是,不得不新写一个 CLI client 或者 Web 前端,这又是一个不小的工作量。


基本上,在这里提出这个请求已经离题了。所以我不打算再答复太多。

事实上更适合这个需求可能是 SaaS 形式的 RSS 阅读器,这种形式的 RSS 阅读器,应当可以做到云端推送。 但我并没有相关推荐,因为我努力避免使用非自由的 SaaS (这也是为什么我为 RSStT 选择了 AGPLv3+ 许可证),因此没有在使用这类阅读器。有无自由的可 self-host 的这类阅读器呢,应当是有的,但我不清楚它们是否支持接入厂商推送。