RSS hub instances.
Links:
18:05 email@foogle.com
[header]
<style>#video { display: none; }</style>
[schemes]
https://t.me https://rsshub.app/telegram/channel
[urls]
# This page provides RSS natively
https://myrrc.dev/rss.xml # This is an inline comment
# This page doesn't so we'll query rsshub.app
https://t.me/red_spades
nfmd -c *config* set
I follow around 100 Telegram channels and also other sources like YouTube, Reddit, as well as many small websites. At some point I decided I want everything in a single place. Although most people I know use Telegram for that purpose, messenger style doesn’t seem reasonable due to continuous distraction. Even if you mute notifications and archive chats, you still have items to click through. This is solved in Telegram mobile with swipe up gesture, taking you to next channel or dialog, however, on desktop there is no such functionality. Another idea is to separate messaging and news reading as for me these are two different activities.
Therefore another solution was searched. The easy way was to convert everything to RSS. There are many clever apps like ratt but the need to write manual rules was a bit frustrating, so I discovered RSS hub. A simple and elegant one - pass a link, get RSS. If you don’t want to rely on public instances, host your own.
Next bike-shedding step was to find an RSS reader. Most of my computer time except for the browser is spent in the terminal. Terminal readers like photon may be awesome, and I tried using them, but there still are downsides:
The final decision was to use e-mail. It’s simple, it handles unread items, you can perform fetching and filtering on the server in case your computer is turned off.
The initial plan included writing a daemon which would wake up at specified time, fetch sources from a TOML file in parallel, filter them to get last ones only, convert to HTML and send an email to me. I chose Rust, picked up some libraries and made a prototype. It was… big, around 20MB total. Playing with musl builds, removing libunwind, no luck. Such a simple program definitely shouldn’t be that big.
So I reconsidered the functionality:
After refactoring, the following dependencies were left:
Then I read curl can send SMTP requests, however, the Rust crate didn’t have this, so I decided to switch to C2.
The next prototype was way faster and smaller, around 14kb, but still didn’t feel ideally comfortable. I added missing functionality:
https://t.me/tokacomics
and not https://rsshub.rss.tips/telegram/channel/tokacomics
.a { text-decoration: none; }
video { display:none; }
body,img { width: 600px; }
body {
padding-left:25%;
padding-right:25%;
}
Debian packages as they’re 1) easy to build via pbuilder 2) easy to install on target server 3) (relatively) easy to write.
Not necessarily true as such programs are usually io-bound
Why not C++? Most easily discovered libraries for my task are C ones, and the code would be a mix of two languages which is bad for readability.