Skip to content

GiYmon/blog-aggregator

Repository files navigation

RSS Blog Aggregator CLI

A command-line RSS feed aggregator that allows you to follow RSS feeds, browse posts, and manage your subscriptions.

Prerequisites

  • Node.js (see .nvmrc for required version)
  • PostgreSQL database
  • npm or similar package manager

Installation

  1. Clone the repository

  2. Install dependencies:

    npm install
  3. Set up the database migrations:

    npm run generate
    npm run migrate

Configuration

Create a configuration file at ~/.gatorconfig.json with the following structure:

{
  "db_url": "postgres://username:password@localhost:5432/database_name",
  "current_user_name": "your_username"
}

Note: The current_user_name will be updated automatically when you log in, but you need to provide an initial value.

Usage

Run the CLI with:

npm start <command> [args...]

Available Commands

User Management

  • register <name> - Register a new user account
  • login <name> - Log in with an existing user account
  • users - List all registered users

Feed Management

  • addfeed <name> <url> - Add a new RSS feed (requires login)
  • feeds - List all available feeds
  • follow <url> - Follow an RSS feed (requires login)
  • following - List feeds you're following (requires login)
  • unfollow <url> - Unfollow an RSS feed (requires login)

Content

  • agg - Fetch and aggregate new posts from all feeds
  • browse [limit] - Browse recent posts from followed feeds (requires login)

Utility

  • reset - Reset the database (removes all data)

Examples

# Register and log in
npm start register john_doe
npm start login john_doe

# Add and follow a feed
npm start addfeed "TechCrunch" "https://techcrunch.com/feed/"
npm start follow "https://techcrunch.com/feed/"

# Fetch new posts and browse them
npm start agg
npm start browse 10

# View your subscriptions
npm start following

Development

  • npm start - Run the CLI
  • npm run generate - Generate database migrations
  • npm run migrate - Run database migrations

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published