šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

github.com/Xavier-Hsiao/rss-aggregator

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/Xavier-Hsiao/rss-aggregator

v0.0.0-20241021065828-22c6ad26f32d
Source
Go
Version published
Created
Source

Gator in Golang

This is a command-line tool for aggregating and managing RSS feeds, built with Golang. It uses SQLC for database interaction, Goose for migrations, and Postgres as the database.

Features

  • Aggregate RSS feeds from various sources
  • Stores feeds in a Postgres Database
  • Use command-line interface to manage your RSS feeds

Prerequisites

Before running this tool, ensure that the following dependencies are installed:

  • Go (version 1.20 or higher)
  • PostgreSQL
  • Goose (for migrations)
  • SQLC (for generating database access layer)

Installing Dependencies

  • Go: Download and install Go from the official site or through your package manager.
sudo apt install golang  # Linux
brew install go          # macOS
  • PostgreSQL: Install Postgres:
sudo apt install postgresql  # Linux
brew install postgresql      # macOS
  • Goose: Install Goose for database migrations:
go install github.com/pressly/goose/v3/cmd/goose@latest
  • SQLC: Install SQLC for code generation:
go install github.com/kyleconroy/sqlc/cmd/sqlc@latest

Set up config file

.gatorconfig.json: Create .gatorconfig.json file in your machine's home directory. The program will use it to track current user.

{"db_url":"","current_user_name":""}

Installation

Clone the repository and navigate into the project directory:

git clone https://github.com/Xavier-Hsiao/rss-aggregator.git
cd rss-aggregator

Setting Up the Database

  • Create a new Postgres database:
createdb rss_aggregator
  • Apply database migrations using Goose:
goose postgres "postgres://user:password@localhost/rss_aggregator?sslmode=disable" up

Replace user and password with your PostgreSQL credentials.

  • Save the database URL to gatorconfig.json file.

Running the Tool

go build -o rss-cli
./rss-cli

Usage

Use these commands to manage your RSS feeds!

  • Register user
./rss-cli/cmd/rss-aggregator register username
  • Switch user
./rss-cli/cmd/rss-aggregator login username
  • Add feed for current user
./rss-cli/cmd/rss-aggregator addfeed feedname feedURL
  • List out feeds for current user
./rss-cli/cmd/rss-aggregator feeds
  • Follow feed
./rss-cli/cmd/rss-aggregator follow feedURL
  • Aggregate feeds based on provided time
./rss-cli/cmd/rss-aggregator agg 1m
  • Browse posts for current users
./rss-cli/cmd/rss-aggregator browse

FAQs

Package last updated on 21 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts