{"id":34834537,"url":"https://github.com/cerchie/local-rss","last_synced_at":"2026-03-14T20:05:44.058Z","repository":{"id":324621356,"uuid":"1074479338","full_name":"Cerchie/local-rss","owner":"Cerchie","description":"playing around with rss","archived":false,"fork":false,"pushed_at":"2025-11-16T23:37:14.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-17T01:19:31.950Z","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/Cerchie.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-11T21:45:09.000Z","updated_at":"2025-11-16T23:37:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Cerchie/local-rss","commit_stats":null,"previous_names":["cerchie/local-rss"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Cerchie/local-rss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cerchie%2Flocal-rss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cerchie%2Flocal-rss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cerchie%2Flocal-rss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cerchie%2Flocal-rss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cerchie","download_url":"https://codeload.github.com/Cerchie/local-rss/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cerchie%2Flocal-rss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28032288,"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","status":"online","status_checked_at":"2025-12-25T02:00:05.988Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-12-25T16:00:01.759Z","updated_at":"2025-12-25T16:00:03.306Z","avatar_url":"https://github.com/Cerchie.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🗞️ Local RSS Reader\n# 🚫 Warning: this is a heavily vibe-coded experiment I used to learn about RSS feeds. Use at your own peril.\n\nA local, database-backed RSS reader that fetches posts from your favorite feeds, stores them in PostgreSQL, and generates a clean static HTML page you can open in your browser.\n\n---\n\n## 🚀 Quick Start\n\n### 1. Create the database\n\nMake sure PostgreSQL is running locally and create a database named `rssdb`. If you've created the db but not logged in, you can skip all this with something like:\n\n```\npsql -U username -d rssdb -h localhost\n```\n\n```bash\ncreatedb rssdb\n```\n\nCreate your tables (if you haven’t already):\n\n```sql\n\nCREATE TABLE feeds (\n  id SERIAL PRIMARY KEY,\n  url TEXT NOT NULL UNIQUE,\n  title TEXT,\n  poll_interval INTEGER DEFAULT 3600,\n  last_fetched_at TIMESTAMPTZ,\n  next_poll_at TIMESTAMPTZ,\n  last_error TEXT,\n  last_status INTEGER\n);\n\nCREATE TABLE entries (\n  id SERIAL PRIMARY KEY,\n  feed_id INTEGER REFERENCES feeds(id) ON DELETE CASCADE,\n  guid TEXT,\n  link TEXT,\n  title TEXT,\n  summary TEXT,\n  content TEXT,\n  published_at TIMESTAMPTZ,\n  CONSTRAINT entries_unique_guid UNIQUE (feed_id, guid)\n);\n``` \n\n### 2. Add a new feed manually\nTo insert a feed URL into the database:\n\n```sql\nINSERT INTO feeds (url, next_poll_at) VALUES ('https://example.com/feed.xml', now());\n```\nYou can use psql to connect:\n\n```bash\npsql rssdb\n```\n\n### 3. Run the RSS fetcher\n\nThis script polls feeds that are due for fetching, parses entries, and writes them into the database.\n\n```bash\npython3 rss_reader.py\n```\n\nYou should see logs like:\n\n```bash\n14:09:46 [INFO] Found 2 feeds ready to fetch\n14:09:46 [INFO] Fetching feed https://rmoff.net/index.xml\n14:09:46 [INFO] Parsed 10 items from https://rmoff.net/index.xml\n```\n\n### 4. Generate the static HTML page\n\nAfter feeds are fetched, generate a local HTML view:\n\n```bash\npython3 generate_html.py\n```\n\nYou’ll see output like:\n\n```swift\n✅ HTML generated at /Users/luciacerchie/reader/output/index.html\n```\n\nThen open it in your browser:\n\n```bash\nopen output/index.html\n```\n\n### 🧠 Diagnosing Database Issues\n\nIf something isn’t working, here are common checks:\n\n✅ Check connection\n\nMake sure your DSN matches your local username:\n\n```python\nDB_DSN = \"postgresql://\u003cusername\u003e@localhost:5432/rssdb\"\n```\n\nExample for user luciacerchie:\n\n```python\nDB_DSN = \"postgresql://luciacerchie@localhost:5432/rssdb\"\n```\n\n🔍 See all feeds\n```sql\nSELECT id, url, title, next_poll_at, last_error FROM feeds;\n```\n\n🔍 See latest entries\n\n```sql\nSELECT id, feed_id, link, title, published_at\nFROM entries\nORDER BY published_at DESC\nLIMIT 10;\n```\n\n🔧 Force a re-fetch\n\nIf you updated a feed but it’s not being fetched:\n\n```sql\nUPDATE feeds SET next_poll_at = now();\n🧹 Clear broken feeds or entries\n\n```sql\nDELETE FROM feeds WHERE last_error IS NOT NULL;\nDELETE FROM entries WHERE published_at IS NULL;\n```\n\n⚠️ Common errors\n\nError\tLikely Cause\tFix\nDB write error: constraint \"entries_unique_guid\" does not exist\tThe unique constraint wasn’t created\tRecreate it using ALTER TABLE entries ADD CONSTRAINT entries_unique_guid UNIQUE (feed_id, guid);\nasyncpg.exceptions.InvalidCatalogNameError\tDatabase rssdb doesn’t exist\tRun createdb rssdb\nNo output from rss_reader.py\tNo feeds are due to poll\tRun UPDATE feeds SET next_poll_at = now();\n\n🧩 Folder Overview\ngraphql\n\nreader/\n├── rss_reader.py        # main fetcher and database writer\n├── generate_html.py     # generates index.html from DB\n├── templates/\n│   └── index.html.j2    # Jinja2 template for HTML page\n├── output/\n│   └── index.html       # rendered output\n└── README.md            # this file\n✨ Example Output\nAfter running generate_html.py, your index.html will show a simple feed reader like this:\n\n\n```yaml\n🗞️ My RSS Feed Reader\n──────────────────────────────\nTitle: Kafka Blog\nFeed: blog.net\nPublished: 2025-10-08\n[Open Link]\n```\n\n🧭 ### Troubleshooting Tips\n\n\u003ci\u003e If feeds aren’t being fetched: \u003c/i\u003e\n\nEnsure their next_poll_at ≤ now().\n\nCheck last_error in the feeds table.\n\n\u003ci\u003e If nothing appears in HTML: \u003c/i\u003e\n\nRun the SQL query manually to confirm entries exist.\n\n\n\u003ci\u003e To clean up and start fresh: \u003c/i\u003e\n\n```sql\nTRUNCATE entries, feeds RESTART IDENTITY;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcerchie%2Flocal-rss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcerchie%2Flocal-rss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcerchie%2Flocal-rss/lists"}