Telegram client that monitors subscribed channels and compiles a convenient digest, so you don't have to use Telegram
  • Rust 99.4%
  • Dockerfile 0.6%
Find a file
Orest Smertnyi (foresle) a29b77f28c
All checks were successful
Pipeline 1 / Check (push) Successful in 11m53s
Pipeline 1 / Build (push) Has been skipped
Pipeline 1 / Check (release) Has been skipped
Pipeline 1 / Build (release) Successful in 7m34s
Store reply target on ingest
2026-08-12 03:15:25 +02:00
.forgejo/workflows Fix sqruff 0.39.0 lint error 2026-07-16 17:12:20 +02:00
.sqlx Store reply target on ingest 2026-08-12 03:15:25 +02:00
migrations Store reply target on ingest 2026-08-12 03:15:25 +02:00
src Store reply target on ingest 2026-08-12 03:15:25 +02:00
tests Add post original link to Atom entity 2026-07-16 10:20:45 +02:00
.dockerignore Add channel post ingestion 2026-06-26 18:29:14 +02:00
.gitignore Add channel post ingestion 2026-06-26 18:29:14 +02:00
.sqruff Add PostgreSQL store with database migrations 2026-06-21 21:20:37 +02:00
Cargo.lock Add Atom feed 2026-07-11 15:38:42 +02:00
Cargo.toml Add Atom feed 2026-07-11 15:38:42 +02:00
Dockerfile Pin Docker bases to Debian Trixie 2026-06-27 01:07:54 +02:00
example.compose.yaml Add Atom feed 2026-07-11 15:38:42 +02:00
example.config.toml Add Atom feed 2026-07-11 15:38:42 +02:00
README.md Add Atom feed 2026-07-11 15:38:42 +02:00

notgram

Through a dedicated Telegram account, notgram follows a set of Telegram channels and republishes their posts as a single Atom feed, so the channels can be read in any RSS reader without running Telegram on a personal device. It is written in Rust and runs in Docker.

Development

Running notgram needs a reachable PostgreSQL database.
Build and run the binary, which prints the available commands:

cargo run -- --help

Run the tests:

cargo test

Generate a new empty migration under migrations/ with sqlx-cli:

sqlx migrate add <name>

Lint and format a migration with sqruff:

sqruff lint migrations/<file>.sql
sqruff fix migrations/<file>.sql

Before committing database-related changes, regenerate the offline query cache under .sqlx/ with sqlx-cli and commit it alongside the code, so offline builds match the current queries:

cargo sqlx prepare

Deployment

A deployment runs as two Docker containers built from one image, an ingestion service that captures new posts and their media from the Telegram channels into a PostgreSQL database, and a feed service that serves the Atom feed over HTTP from the same database. Both are configured through a data directory that holds the configuration and the Telegram session. See example.compose.yaml and example.config.toml for a starting point.

Feed access

The feed service serves the feed at the /feed route. The route requires HTTP Basic Auth, and the credentials an RSS client sends are checked against username and password from the feed section of the configuration. Requests without valid credentials get a 401 response. The URL itself is not treated as a secret. Basic Auth sends the credentials with every request practically in plain text, so the service should be exposed to the world only through a reverse proxy that terminates TLS.