{"id":30493095,"url":"https://github.com/mathew005/google-new-summary-rss","last_synced_at":"2026-02-10T09:03:35.161Z","repository":{"id":308296981,"uuid":"1032306052","full_name":"Mathew005/Google-New-Summary-RSS","owner":"Mathew005","description":"A google news summary creator using google rss new feed.","archived":false,"fork":false,"pushed_at":"2025-08-05T06:01:12.000Z","size":308,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-24T23:39:42.769Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mathew005.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-05T05:55:23.000Z","updated_at":"2025-08-05T06:01:16.000Z","dependencies_parsed_at":"2025-08-05T07:31:38.437Z","dependency_job_id":"7d441e5e-ad50-4138-8c63-7c292c8f5227","html_url":"https://github.com/Mathew005/Google-New-Summary-RSS","commit_stats":null,"previous_names":["mathew005/google-new-summary-rss"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Mathew005/Google-New-Summary-RSS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mathew005%2FGoogle-New-Summary-RSS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mathew005%2FGoogle-New-Summary-RSS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mathew005%2FGoogle-New-Summary-RSS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mathew005%2FGoogle-New-Summary-RSS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mathew005","download_url":"https://codeload.github.com/Mathew005/Google-New-Summary-RSS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mathew005%2FGoogle-New-Summary-RSS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29295388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T03:42:42.660Z","status":"ssl_error","status_checked_at":"2026-02-10T03:42:41.897Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-24T21:52:33.046Z","updated_at":"2026-02-10T09:03:34.753Z","avatar_url":"https://github.com/Mathew005.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI News Summarizer 🚀\n\nA dynamic web application that fetches the latest news from Google News, uses Large Language Models (LLMs) for summarization, and displays the results in a modern, responsive interface. The application features a non-blocking background task queue to process summaries, with on-screen articles being prioritized for a seamless user experience.\n\n![Screenshot of the AI News Summarizer application](./screenshot.png)\n\n## Key Features ✨\n\n-   **Dual LLM Support:** Easily switch between a local [Ollama](https://ollama.com/) instance (e.g., using Gemma, Llama3) and the cloud-based Google Gemini API.\n-   **Live News Feed:** Fetches trending news from India or search results for any user-defined topic.\n-   **Background Processing:** Summarization tasks are handled by a dedicated background thread, ensuring the UI remains fast and responsive.\n-   **Priority Queue:** Intelligently prioritizes summarizing articles that are currently visible to the user.\n-   **Persistent Caching:** Uses a SQLite database to cache news articles and summaries, improving performance and data integrity.\n-   **Time-To-Live (TTL) Cache:** Automatically fetches fresh news for a topic if the cached data is older than 15 minutes, ensuring content stays relevant.\n-   **Dynamic UI:** The frontend automatically polls for completed summaries and updates the view without requiring a page refresh.\n-   **Modern \u0026 Responsive:** Built with clean HTML, modern CSS, and vanilla JavaScript for a fast, accessible experience on any device.\n\n## Technology Stack ⚙️\n\n-   **Backend:** Python 3, Flask\n-   **LLM Integration:** `ollama`, `google-generativeai`\n-   **Data Fetching:** `feedparser`\n-   **Database:** SQLite 3 (via Python's `sqlite3` module)\n-   **Environment Management:** `python-dotenv`\n-   **Frontend:** HTML5, CSS3, Vanilla JavaScript (Fetch API, DOM Manipulation)\n\n---\n\n## Setup and Installation 🔧\n\nFollow these steps to get the application running on your local machine.\n\n### 1. Prerequisites\n\n-   Python 3.8+\n-   (Optional) [Ollama](https://ollama.com/) installed and running if you plan to use it as an AI provider.\n\n### 2. Clone the Repository\n\n```bash\ngit clone https://github.com/Mathew005/Google-New-Summary-RSS.git\ncd Google-New-Summary-RSS\n```\n\n### 3. Set Up a Virtual Environment\n\nIt's highly recommended to use a virtual environment to manage dependencies.\n\n```bash\n# Create the virtual environment\npython3 -m venv venv\n\n# Activate it (on Linux/macOS)\nsource venv/bin/activate\n\n# On Windows, use:\n# venv\\Scripts\\activate\n```\n\n### 4. Install Dependencies\n\nCreate a file named `requirements.txt` in the project root with the following content:\n\n```\n# requirements.txt\nflask\nfeedparser\npython-dotenv\ngoogle-generativeai\nollama\n```\n\nNow, install these packages using pip:\n\n```bash\npip install -r requirements.txt\n```\n\n### 5. Configure Your Environment\n\nCreate a file named `.env` in the project root. You can copy the example below and fill in your details.\n\n```env\n# .env file\n\n# --- AI Provider Selection ---\n# Choose your AI provider. Use \"google\" or \"ollama\".\nAI_PROVIDER=\"ollama\"\n\n\n# --- Google AI Configuration ---\n# Required if AI_PROVIDER is \"google\".\n# Get your API key from Google AI Studio: https://aistudio.google.com/app/apikey\nGOOGLE_API_KEY=\"YOUR_GOOGLE_API_KEY_HERE\"\nGOOGLE_MODEL=\"gemini-1.5-flash\"\n\n\n# --- Ollama Configuration ---\n# Required if AI_PROVIDER is \"ollama\".\n# Make sure your Ollama instance is running.\nOLLAMA_MODEL=\"gemma3n\"\n```\n\n**Important:** If using Ollama, ensure you have pulled the model you specify in the `.env` file. For example:\n`ollama pull gemma3n`\n\n---\n\n## Running the Application ▶️\n\nWith your virtual environment activated and your `.env` file configured, start the Flask server:\n\n```bash\npython3 app.py\n```\n\nThe server will start, initialize the database (`news.db` will be created), and launch the background threads.\n\nYou can now access the application in your web browser at:\n**[http://127.0.0.1:5000](http://127.0.0.1:5000)**\n\n## How It Works 💡\n\nThe application is composed of several key components working together:\n\n1.  **Flask Web Server:** Handles incoming HTTP requests. It serves the main `index.html` page and provides a `/get-news` API endpoint.\n2.  **SQLite Database (`news.db`):** Acts as the single source of truth. It stores all fetched articles, their metadata, and their summarization status (`pending`, `in_progress`, `done`, `error`).\n3.  **Startup Thread:** When the app starts, this thread runs once to initialize the database and reset any summaries that were stuck `in_progress` from a previous run. It also warms up the Ollama model if selected.\n4.  **Background Summarizer Thread:** This is the application's workhorse. It runs continuously in a loop:\n    -   It first checks a high-priority in-memory queue for articles that the user is currently viewing.\n    -   If the priority queue is empty, it queries the database for any article with a `pending` status.\n    -   It processes one article at a time, calling the selected LLM and updating the database with the result.\n5.  **Frontend JavaScript:** The client-side code fetches news from the `/get-news` endpoint, renders the article cards, and then polls periodically to check for and display newly completed summaries.\n\n## Project Structure 📁\n\n```\n/AI-News-Summarizer\n|-- app.py              # The main Flask application backend\n|-- templates/\n|   |-- index.html      # The single HTML file for the user interface\n|-- .env                # Your local configuration file (secret)\n|-- news.db             # The SQLite database (created on first run)\n|-- requirements.txt    # Python dependencies\n|-- README.md           # This file\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathew005%2Fgoogle-new-summary-rss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathew005%2Fgoogle-new-summary-rss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathew005%2Fgoogle-new-summary-rss/lists"}