config: accept user_id from file

This commit is contained in:
TheGeneralist 2026-02-13 19:50:24 +01:00
parent c1e0481639
commit 08d5e8aa5e
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4
2 changed files with 112 additions and 3 deletions

32
README.md Normal file
View file

@ -0,0 +1,32 @@
# Read Later Bot
## Configuration
The bot reads a TOML config passed via `--config`. Most values are standard TOML types. The `user_id` field accepts multiple forms so it can be sourced from secrets managers.
### `user_id`
You can provide the Telegram user ID as:
- A number
- A numeric string
- A file path containing the numeric ID (useful for age/sops)
- An explicit file object
Examples:
```toml
user_id = 123456789
```
```toml
user_id = "123456789"
```
```toml
user_id = "/run/agenix/readlater-user-id"
```
```toml
user_id = { file = "/run/agenix/readlater-user-id" }
```