Logo Lanfrica

asgerami/good-news-ethiopia

Domain:

digital infrastructure

Record type:

software
Creator:
asg
Host:
# Good News Ethiopia A bot that scrapes Tikvah Ethiopia's public Telegram channels, uses Gemini to find posts that are genuinely positive news (and filters out ads, rumors, and negative news), translates them into English, and posts them to the Good News Ethiopia Telegram channel. Every post includes: - A short English summary - A link to the full English translation (hosted free on Telegra.ph) - A link back to the original Tikvah post ## How it works 1. **Scrape** — fetches recent posts from each channel in `SOURCE_CHANNELS` via Telegram's public `t.me ` preview page (no login required). 2. **Pre-filter** — skips obvious ads (classified-ad phone numbers, spammed links, Tikvah's own "Partnership with Tikvah-Ethiopia" sponsor tag) before spending an API call on them. 3. **Classify + translate** — sends the remaining posts to Gemini in batches, asking it to decide whether each one is genuinely good news, whether it's authentic and safe to repost, and to produce a full English translation plus a short summary. 4. **Publish** — for anything that passes, publishes the full translation to Telegra.ph and posts the summary + both links to the Telegram channel. 5. **Track state** — processed post IDs are saved in `state.json` so reruns never repost the same story. It's designed to run unattended every 30 minutes (see Deployment). ## Setup ### 1. Create the Telegram bot 1. Message @BotFather on Telegram → `/newbot` → follow the prompts. Save the token it gives you. 2. Create (or use an existing) Telegram channel for the bot to post to. 3. Add the bot as an **admin** of that channel (Channel settings → Administrators → Add Admin), with permission to post messages. ### 2. Get a Gemini API key Get a free key from Google AI Studio. > **Free tier quota varies by model.** `gemini-flash-latest` has hit a > 20-requests/day wall on some keys. This bot defaults to > `gemini-flash-lite-latest`, which has a much more workable free quota — if > you change `GEMINI_MODEL`, sa …