@drakulavich/uae-news-digest
v0.1.1
Published
Daily UAE news digest from Google News RSS with optional DeepL translation
Downloads
65
Readme
- Signal first. Preferred sources and UAE-specific keywords push important stories up.
- No repeat sludge. Exact keys plus fuzzy title matching collapse syndicated duplicates.
- Human or machine. Read the emoji digest in your terminal, or pipe stable JSON into agents, cron, Slack, or your own scripts.
- Bring your own feed. Use UAE by default, switch regions, or pass any RSS URL.
- Translate only when you ask. Optional DeepL support keeps the default path simple and dependency-light.
Install
bun add -g @drakulavich/uae-news-digestOr run from source:
git clone https://github.com/drakulavich/uae-news-digest.git
cd uae-news-digest
bun install
bun linkUsage
uae-news-digest # fetch + print UAE news
uae-news-digest --hours 12 --limit 10 # tighter briefing window
uae-news-digest --json # stable envelope for automation
uae-news-digest --region de # Germany preset
uae-news-digest --rss-url http://localhost/feed.xml # any RSS feed
uae-news-digest healthcheck # JSON liveness probe
DEEPL_AUTH_KEY=xxx uae-news-digest --target-lang DE # optional DeepL translation| Flag | Default | Description |
|------|---------|-------------|
| --region <code> | uae | News region preset (uae, us, uk, de) |
| --hours <n> | 36 | Lookback window in hours |
| --limit <n> | 6 | Max items in digest |
| --target-lang <code> | | DeepL target language (e.g. DE, FR, JA). Requires DEEPL_AUTH_KEY |
| --rss-url <url> | | Custom RSS URL (overrides --region) |
| --state-file <path> | ./seen_titles.txt | Seen-items state file |
| --timeout-ms <n> | 15000 | RSS fetch timeout |
| --topics-config <path> | | Path to topics config JSON (overrides auto-detect) |
| --no-topics | | Force legacy region mode even if a topics config is present |
| --dry-run | false | Preview without updating state |
| --json | false | Output as JSON (agent-friendly envelope) |
What You Get
🇦🇪 UAE Latest News Digest
🛡️ UAE intercepts 79 Iranian strike assets (The National, 2h ago)
📉 Dubai property sales drop more than 30% (Anadolu Ajansı, 5h ago)
⛴️ Container ship incident at Khor Fakkan (Reuters, 3h ago)
✈️ Abu Dhabi airport reopens after rain (Khaleej Times, 1h ago)
🌧️ Unstable weather hits some emirates (Gulf News, 4h ago)
🛢️ Oil prices: OPEC+ mulls output increase (CNBC, 6h ago)And when you need structured output:
uae-news-digest --json | jq '.items[].title'Topics Mode
For per-topic digests (e.g. economy, real estate, regional politics) instead of one undifferentiated regional feed, create a digest.config.json file:
{
"locale": { "hl": "en", "gl": "AE", "ceid": "AE:en" },
"topics": [
{
"slug": "economy",
"name": "UAE economy",
"emoji": "💰",
"query": "(UAE OR Emirates) AND (economy OR GDP OR inflation OR ADNOC OR non-oil)",
"limit": 5
},
{
"slug": "realty",
"name": "Real estate",
"emoji": "🏠",
"query": "(Dubai OR \"Abu Dhabi\") AND (\"real estate\" OR property OR Emaar OR Aldar)",
"limit": 4
},
{
"slug": "chocolate",
"name": "Dubai chocolate",
"emoji": "🍫",
"query": "\"Dubai chocolate\" OR pistachio OR kunafa",
"limit": 3
}
]
}The CLI looks for the config in this order:
--topics-config <path>(explicit override)./digest.config.json(current working directory)$XDG_CONFIG_HOME/uae-news-digest/topics.json(falls back to~/.config/uae-news-digest/topics.json)
When a config is found, the CLI fetches each topic in parallel and renders one section per topic. Cross-topic dedup is "first topic in config wins" — reorder the array to set priority. To force the legacy region mode while a config is present, pass --no-topics.
--target-lang translates all section titles in a single DeepL batch. --limit, when explicitly set, overrides every topic's per-topic limit for the run.
The example query strings above are starting points, not optimal — iterate them against real Google News output.
Topics-mode JSON output
{
"tool": "uae-news-digest",
"version": "...",
"mode": "topics",
"query": { "hours": 36, "targetLang": null },
"topics": [
{ "slug": "economy", "name": "UAE economy", "count": 5 },
{ "slug": "realty", "name": "Real estate", "count": 4 },
{ "slug": "chocolate", "name": "Dubai chocolate", "count": 1 }
],
"count": 10,
"warnings": [],
"items": [
{ "topic": "economy", "title": "...", "source": "...", "score": 0, "publishedAt": "...", "hoursAgo": 4 }
]
}Items are emitted as a flat list in section order; each carries its topic slug so consumers can group. Legacy region mode emits the same envelope with mode: "region" and without the topics array.
Programmatic API
import { parseRss, buildDigest, runDigest, renderDigest } from "@drakulavich/uae-news-digest/core";Use the core API when you already have RSS XML and want the same filtering, scoring, deduplication, translation fallback, and rendering logic without spawning the CLI.
How It Works
uae-news-digest --region us --hours 12 --limit 10
│
├── Region ────── resolve RSS URL from preset (or --rss-url override)
│
├── Fetch RSS ─── Google News RSS feed
│
├── Filter ────── skip: opinion, tabloids, sports, travel
│
├── Score ─────── +3 preferred source, +2 UAE mention, +2 priority topic
│
├── Deduplicate ─ exact key match + Jaccard fuzzy (threshold 0.45)
│
├── Translate ─── DeepL API (optional, when --target-lang set)
│
└── Render ────── region flag + emoji + title + source + hours agoState file (seen_titles.txt) tracks seen articles so scheduled runs do not repeat the same briefing forever.
healthcheck uses the default live Google News RSS feed. For deterministic smoke tests, pass healthcheck --rss-url <url>.
Requirements
- Bun >= 1.3 (CI pins 1.3.14).
- CI validates Linux and macOS. Windows is not a supported target yet.
License
Made with 💛🩵 Published under MIT License.
