Forum teuk.org

🦉 The Daily Prophet Learns to Whisper: Mediabot’s New News Bulletin

in Mediabot · started by TeuK · 2d ago

TeuK · 2d ago

MB815 · Mediabot v3 · 3.6dev development update

A newspaper is welcome in the Great Hall. A flock of owls dropping the same story on everyone’s breakfast is rather less welcome.

Mediabot’s interactive news commands have received a substantial revision: a compact opening, recognizable article links, and a measured delivery rhythm that gives the IRC conversation room to breathe. 📰✨

A shorter scroll, with useful references 📜

The bulletin now opens with a paragraph about the selected stories. Below it, each reference contains the date, publisher, a short beginning of the headline, and its link.

The opening and its references follow the same selected articles. Up to three references are grouped onto as few IRC lines as their lengths allow. A short bulletin can fit on two lines; longer text or URLs may require more.

The old search announcement is gone. So are the numbered dispatches followed by another numbered list repeating their full headlines. There is enough title beside each URL to tell the links apart.

Headline excerpts allow up to 64 UTF-8 bytes, roughly 55 characters depending on accents, and usually end between words with an ellipsis. URLs stay complete. The IRC line limit still decides when another line is needed.

Even Hermione checks her sources 🔎

The bot starts with specific, dated press headlines. It filters generic daily roundups, undated results, future dates and stale material, and avoids giving the same story several slots simply because multiple publishers covered it.

When configured, Tavily can add an excerpt that matches the selected story and publisher. It is optional: a usable RSS feed can supply the headlines without a Tavily key. An excerpt also does not mean the entire article was read.

An existing configured AI provider can turn that evidence into a structured opening. The bot checks source coverage, article alignment, numbers and output limits before accepting it. Links come from the selected articles rather than from the model’s imagination.

If that synthesis is unavailable or remains unusable, the fallback says so plainly: “From the headlines”, “D’après les titres”, or the equivalent in the selected language. It combines the retained headlines into a paragraph and keeps their source links.

That distinction matters. The live French examples use the headline fallback; they are not being presented as a successful AI synthesis. A tidy scroll should still tell the truth about how it was written. 🪄

Owls arrive one at a time 🦉

The first line can leave immediately when the news queue is idle. Following lines are spaced by at least 1.5 seconds, with one news queue shared across the bot’s channels.

If the event loop is delayed, the bot sends one pending line and starts a fresh interval. It does not unleash a catchup flock. Existing AntiFlood controls remain active and can delay delivery further.

Pending lines expire, and news from an old IRC connection is discarded. Network work stays in the existing command worker; the main process handles the paced delivery.

This controls interactive news output. It does not claim to regulate every other message the bot sends, and scheduled RSS posting keeps its separate channel limits.

The spellbook remains familiar 🧙‍♂️

Use your channel’s configured command prefix. With the usual ! prefix:

!news
!actualités
!news transport
!news transport en

The existing aliases, shared cooldown and language selection remain in place. Explicit language requests, channel language and the configured default continue to work as before.

This is a 3.6dev improvement. No new database table or configuration key is required for this bulletin revision.

The result has been checked through regression tests and live development-channel output, including the longer title excerpts after restarting the development instance. It is now much easier to skim the opening, recognize a reference and open the corresponding article without drowning out the conversation.

The Daily Prophet has learned some IRC manners. Mischief managed. 🗺️✨

Project, installation and documentation

You must be logged in to reply.