Skip to content

A simple Python application that creates summaries of RSS feeds for easy reading. Uses Ollama for cheap and private inference.

License

Notifications You must be signed in to change notification settings

rb81/ollama-feed-summarizer

Repository files navigation

Ollama Feed Summarizer

Feed Summarizer

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.

Features

  • 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.)

Requirements

Installation

  1. Clone this repository:

    git clone https://github.com/rb81/ollama-feed-summarizer.git
    cd ollama-feed-summarizer
    
  2. Install the required Python packages:

    pip install -r requirements.txt
    
  3. 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
        }
    }
  4. Create a feeds.txt file with one RSS feed URL per line.

Usage

Run the script with:

python main.py

The script will:

  1. Read RSS feeds from feeds.txt
  2. Fetch and summarize the specified number of articles from each feed
  3. Compile summaries into a markdown file in the specified output folder
  4. Update feeds.txt and removed_feeds.txt if any feeds are unavailable or do not contain any content
  5. NEW: Generate an audio summary of the articles if TTS is enabled

Output

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

Configuration

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

License

This project is licensed under the MIT License - see the LICENSE file for details.

Transparency Disclaimer

ai.collaboratedwith.me in creating this project.

About

A simple Python application that creates summaries of RSS feeds for easy reading. Uses Ollama for cheap and private inference.

Topics

Resources

License

Stars

Watchers

Forks

Languages