A small CLI tool for managing feeds, following them, scraping RSS content, and browsing recent posts.
- Node.js 18+
- PostgreSQL running locally or remotely
- npm
-
Install dependencies:
npm install
-
Create a PostgreSQL database and note the connection string.
-
Create a config file at your home directory:
~/.gatorconfig.jsonExample:
{ "db_url": "postgresql://postgres:postgres@localhost:5432/gator", "current_user_name": "guest" }
Generate and apply migrations:
npm run generate
npm run migrateStart the CLI with:
npm start -- <command>-
Register a user:
npm start -- register myname
-
Login as a user:
npm start -- login myname
-
Add a feed:
npm start -- addfeed "My Feed" https://example.com/feed.xml -
Follow a feed:
npm start -- follow https://example.com/feed.xml
-
List followed feeds:
npm start -- following
-
Start the aggregator:
npm start -- agg 1m
-
Browse recent posts:
npm start -- browse 5
- The aggregator runs continuously until you stop it with Ctrl+C.
- The scraper stores posts in the database and uses the feed fetch timestamps to decide what to scrape next.