Problem
Every day there is more worth reading than there is time to read it, and the feeds that are supposed to help are built to keep you scrolling, not to inform you. Wildlife and conservation research, AI and data engineering, what is happening in the Canary Islands, politics and science all matter to me, and each lives in a different set of outlets. Checking them by hand costs a morning, and social feeds reward whatever is loudest.
What I want is closer to a good editor: someone who has read everything, drops the duplicates and the clickbait, and hands me ten pieces worth my coffee, each with a line on why I should care.
Approach
Reader profile
Search and verify
Score and de-duplicate
Pick ten
Summarise and publish
How it works today
The first version runs as a scheduled task every morning at 07:11 Canary Islands time. A written brief tells an AI model who the reader is, which six categories to cover, which outlets to trust and how to choose. The model searches the web per category and per source, opens each candidate to check that it exists, is recent and is about what the headline says, ranks them, and publishes the result as a page with a push notification.
The six categories are wildlife, conservation and climate; AI, technology and data; Canary Islands and Spain; politics; science; and travel, diving and sport. The reference sources include Mongabay, Carbon Brief, MIT Technology Review, Ars Technica, Nature, Canarias7, RTVC, eldiario.es and the ATP Tour, among others, and the model may use others of equivalent quality.
The digest started at five to seven articles and now has ten per day. That meant two changes to the brief: the model also reads the front pages and sections of the reference sources instead of relying only on search results, and the cap per category went from two to three, with at least five categories covered, so ten items still feel varied.
Selection rules
- Relevance first. Each candidate is scored on relevance to the reader, importance or impact, quality of the source and originality.
- No duplicates, no clickbait. If several outlets cover the same story, only the best coverage stays. Sensational headlines are dropped.
- Variety is enforced. At least five categories per day and no more than three items from any one of them. There is always a Canary Islands item when something relevant happened.
- Neutral on politics. Facts without opinion and, on polemical topics, outlets from different editorial lines.
- Own words, always. Summaries are written from scratch, with at most one short quotation, and the link goes to the original.
- Never filler. If a day does not have ten good articles, the digest has fewer and says so.
Technical design
The project has two implementations of the same pipeline. The first is the scheduled AI task above, which needs no code. The second is the code version in this site's repository, scripts/news_digest.py, which does the mechanical steps deterministically and uses the language model only where it is needed, the writing.
- Ingestion. A list of RSS and Atom feeds with a category and a weight per source, kept in
scripts/news_sources.json. A feed that fails is skipped, so one broken source never stops the digest. Only items from the last 36 hours are kept. - De-duplication. The same URL, or titles whose word overlap (Jaccard similarity) is 0.6 or more, count as one story and the source with the higher weight wins.
- Scoring. Score = source weight × freshness × (1 + log(1 + interest)) ÷ clickbait penalty. Freshness halves every 12 hours. Interest is the sum of weights of profile keywords found in the title and snippet, such as conservation, data engineer, Canarias or tennis. A clickbait phrase divides the score by three.
- Selection. First the best item of every category, so no category is missing, then the best remaining items, with at most three per category, until there are ten.
- Summaries. With an API key, the Claude API writes two sentences in Spanish and a “why it matters” line for each chosen article from its title and snippet, under a prompt that forbids inventing facts and requires a warning when the snippet is too thin. Without a key, the feed snippet is used.
- Storage. One JSON file,
data/news.json, holds the full edition for today and only headline, link, source and category for the previous six days. This page reads that file and draws it in the browser. - Automation. A GitHub Actions workflow runs the script and commits the file. It runs only on demand for now, and a daily schedule is a commented line away.
Honest limits
This is a personal tool and an early one. Ranking by prompt is a judgement, not a measured result: I have not yet tracked how often the picks are the ones I would have chosen myself. The AI summaries can be wrong, which is why each one links to the original and why the code version works from the snippet only. The code version is tested on sample feeds, not yet on the live ones, and its feed addresses still need checking one by one. The digest shown above is a snapshot that I update by hand until the workflow runs daily, and the reading times are estimates. One example of a limit in practice: when a source page could not be opened while preparing a day's selection, the summary says it is based on the front-page excerpt.
Next steps
- Measure it. Add a thumbs up or down per article, and use it to report how many of the ten I would keep, then tune the weights from that.
- Better de-duplication. Compare articles by meaning with embeddings, not only by shared words.
- More outputs. An RSS feed of the digest, an email or a Telegram message at 07:00, and a Spanish and English edition.
- Make it configurable. Move the profile, categories and sources into a settings file so that anyone could run it for their own interests.