An automated, AI-powered daily news intelligence briefing designed seamlessly for Newsboat (or any terminal/desktop RSS workflow).
NewsCaptain updates your local RSS feeds, filters out noise (celebrity gossip and other irrelevant news), synthesizes high-impact national/international affairs and local developments using Google Gemini AI, and formats a clean XML briefing delivered straight to your Newsboat interface with daily desktop notifications.
- AI Noise-Filtering: Evaluates feeds based on a customizable prompt matrix (prioritizes high-impact tech, geopolitical, economic, and regional news).
- Newsboat First-Class Integration: Embeds natively into Newsboat using local
filter:catfeed definitions. - Automated Daily Runs: Powered by Systemd timers to execute strictly once a day on first boot.
- Terminal Friendly: Formatted for lightweight, fast scanning inside terminal emulators.
- Privacy-Aware & Flexible: Keeps local state in SQLite and parses raw content clean using
trafilatura.
NewsCaptain/
├── systemd/
│ ├── newscaptain.service # Systemd user service unit template
│ └── newscaptain.timer # Daily execution timer
├── newscaptain.py # Core Python engine (DB extraction, Gemini synthesis, XML rendering)
├── newscaptain_daily.sh # Main Shell wrapper script
├── requirements.txt # Lightweight Python dependencies
├── LICENSE # MIT License
└── README.md
- Clone the Repository
git clone https://github.com/your-username/NewsCaptain.git
cd NewsCaptain- Set Up Virtual Environment & Dependencies
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt- Configure Gemini API Key
Obtain an API key from Google AI Studio and export it, or set it directly in your environment/service.
export GEMINI_API_KEY="your-api-key"To view the generated AI Briefing directly inside Newsboat, add the following entry to your ~/.config/newsboat/urls configuration file:
"filter:cat ~/.config/newsboat/ai_feed.xml" "Summary" "News"
Make sure your newscaptain.py outputs the generated HTML briefing to ~/.config/newsboat/ai_feed.xml (or your configured output directory).
NewsCaptain includes Systemd unit files to automatically update feeds and build your briefing once a day on your first system boot.
- Create the user Systemd directory (if it doesn't exist):
mkdir -p ~/.config/systemd/user- Copy the unit files from the repository:
cp systemd/newscaptain.* ~/.config/systemd/user/- Edit
~/.config/systemd/user/newscaptain.serviceto update your path and set yourGEMINI_API_KEY:
[Unit]
Description=Updates Newsboat & Generates AI Summary
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
Environment="GEMINI_API_KEY=YOUR_GEMINI_API_KEY_HERE"
ExecStart=/home/<username>/.config/newscaptain_daily.sh
[Install]
WantedBy=default.target- Enable and start the daily timer:
systemctl --user daemon-reload
systemctl --user enable --now newscaptain.timerYou can run the wrapper manually at any time to test or trigger an immediate refresh:
chmod +x newscaptain.sh
./newscaptain.shThis project is open-source and available under the MIT License.