Ollama Feed Summarizer is a Python application that loops through multiple RSS feeds, summarizing articles using a model running locally using Ollama, and stores the summaries in a daily summary file for easy reading.
Check out Feed Summarizer for a more powerful version that uses Claude for summarization, and a GitHub repository for storage.
- Fetches articles from multiple RSS feeds
- Summarizes articles using AI (Ollama)
- Compiles summaries into a single markdown file
- Handles unavailable feeds and updates the feed list
- Configurable via JSON file
- Outputs summaries with a date-stamped heading
- NEW: Converts summaries to audio using Text-to-Speech (TTS) with OpenedAI Speech. (This script assumes that you have a local instance of OpenedAI Speech running.)
- Python 3.7+
- Ollama installed and running locally
- OpenedAI Speech for TTS functionality
-
Clone this repository:
git clone https://github.com/rb81/ollama-feed-summarizer.git cd ollama-feed-summarizer
-
Install the required Python packages:
pip install -r requirements.txt
-
Create a
config.json
file in the project directory with the following structure:{ "feeds_file": "feeds.txt", "removed_feeds_file": "removed_feeds.txt", "output_folder": "/path/to/your/output/folder", "num_articles": 5, "ollama_model": "llama3.2:3b", "ollama_ip": "localhost", "ollama_port": "11434", "text_to_speech": { "enabled": true, "endpoint_url": "http://localhost:8000/v1/audio/speech", "model": "tts-1", "voice": "alloy", "response_format": "mp3", "speed": 1.0 } }
-
Create a
feeds.txt
file with one RSS feed URL per line.
Run the script with:
python main.py
The script will:
- Read RSS feeds from
feeds.txt
- Fetch and summarize the specified number of articles from each feed
- Compile summaries into a markdown file in the specified output folder
- Update
feeds.txt
andremoved_feeds.txt
if any feeds are unavailable or do not contain any content - NEW: Generate an audio summary of the articles if TTS is enabled
The script generates a markdown file named YYYY-MM-DD_feed-summaries.md
in the specified output folder. The file contains:
- A heading with the current date (e.g., "News for Tuesday, January 1, 2024")
- Summaries of articles from the processed feeds
- NEW: A link to the audio summary if TTS is enabled
Adjust the config.json
file to change:
- Input and output file locations
- Number of articles to summarize per feed
- Ollama model and connection details
- NEW: TTS settings such as model, voice, and speed
This project is licensed under the MIT License - see the LICENSE file for details.
ai.collaboratedwith.me in creating this project.