{"id":26668824,"url":"https://github.com/drhdev/rss2supabase","last_synced_at":"2025-03-25T21:35:12.394Z","repository":{"id":283161682,"uuid":"950889948","full_name":"drhdev/rss2supabase","owner":"drhdev","description":"A simple python script that reads an RSS feed and publishes new entries to Supabase.","archived":false,"fork":false,"pushed_at":"2025-03-18T21:17:34.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T21:38:23.138Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drhdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-03-18T20:52:00.000Z","updated_at":"2025-03-18T21:17:38.000Z","dependencies_parsed_at":"2025-03-18T21:49:38.394Z","dependency_job_id":null,"html_url":"https://github.com/drhdev/rss2supabase","commit_stats":null,"previous_names":["drhdev/rss2supabase"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drhdev%2Frss2supabase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drhdev%2Frss2supabase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drhdev%2Frss2supabase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drhdev%2Frss2supabase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drhdev","download_url":"https://codeload.github.com/drhdev/rss2supabase/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245549891,"owners_count":20633865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-03-25T21:35:11.665Z","updated_at":"2025-03-25T21:35:12.378Z","avatar_url":"https://github.com/drhdev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RSS2Supabase\n\n## Overview\n\n**RSS2Supabase** is a Python script that fetches an RSS feed, processes new entries, and stores them in a **Supabase** database. It ensures data integrity, retries on network failures, and logs each step for debugging.\n\n## Features\n\n- Fetches and parses RSS feeds.\n- Avoids duplicates by checking existing entries in Supabase.\n- Implements error handling and retry logic for network failures.\n- Logs all actions for debugging.\n- Uses UTF-8 encoding to prevent character corruption.\n- Secure API credentials using `.env` file.\n\n## Prerequisites\n\n- Python 3.8+\n- A **Supabase** account\n- An active RSS feed URL\n\n## Installation\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/yourusername/rss2supabase.git\ncd rss2supabase\n```\n\n### 2. Install Dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n### 3. Set Up Environment Variables\n\nCreate a `.env` file in the root directory and add:\n\n```ini\nSUPABASE_URL=your-supabase-url\nSUPABASE_KEY=your-supabase-api-key\nRSS_FEED_URL=https://example.com/rss.xml\n```\n\n### 4. Run the Script\n\n```bash\npython rss2supabase.py\n```\n\n## Database Schema (Supabase)\n\nMake sure you have a `rss_entries` table in your Supabase database:\n\n```\nCREATE TABLE rss_entries (\n    id BIGSERIAL PRIMARY KEY,  -- Ensures unique identifier with a larger range\n    title TEXT NOT NULL CHECK (char_length(title) \u003e 0),  -- Ensures title is not empty\n    content TEXT NOT NULL,  -- Can contain large text\n    published TIMESTAMP WITH TIME ZONE NOT NULL,  -- Ensures proper datetime handling\n    link TEXT NOT NULL UNIQUE CHECK (position('http' IN link) = 1),  -- Ensures a valid URL format\n    created_at TIMESTAMP WITH TIME ZONE DEFAULT now()  -- Timestamp of entry insertion\n);\n```\n\n## Logging\n\nThe script generates a `rss2supabase.log` file in the working directory, which is overwritten each time the script runs.\n\n## License\n\nThis project is licensed under the **GNU Public License v3**.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrhdev%2Frss2supabase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrhdev%2Frss2supabase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrhdev%2Frss2supabase/lists"}