Skip to content

RushdiJa/gator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatorCLI

A small CLI tool for managing feeds, following them, scraping RSS content, and browsing recent posts.

Requirements

  • Node.js 18+
  • PostgreSQL running locally or remotely
  • npm

Installation

  1. Install dependencies:

    npm install
  2. Create a PostgreSQL database and note the connection string.

  3. Create a config file at your home directory:

    ~/.gatorconfig.json

    Example:

    {
      "db_url": "postgresql://postgres:postgres@localhost:5432/gator",
      "current_user_name": "guest"
    }

Database setup

Generate and apply migrations:

npm run generate
npm run migrate

Running the CLI

Start the CLI with:

npm start -- <command>

Common commands

  • 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

Notes

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

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors