Gator is a CLI tool for following and fetching RSS feeds
-
PostgreSQL:
- You'll need a PostgreSQL database to store feed data.
sudo apt update
sudo apt install postgresql postgresql-contrib
sudo passwd postgres
- You'll need a PostgreSQL database to store feed data.
-
Go:
- The program is written in Go, so you'll need Go installed.
sudo apt update
sudo apt install golang-go
- The program is written in Go, so you'll need Go installed.
-
Goose:
go install github.com/pressly/goose/v3/cmd/goose@latest
git clone https://github.com/darginmathi/gator
cd gator
go install .
-
Start the Postgres server in the background
sudo service postgresql start
sudo -u postgres psql
CREATE DATABASE gator;
\c gator
ALTER USER postgres PASSWORD 'postgres';
-
Migrate the tables go to src/schema use this command -
goose postgres postgres://postgres:postgres@localhost:5432/gator up
-
Create and set config file
nano ~/.gatorconfig.json
{"db_url":"postgres://postgres:postgres@localhost:5432/gator?sslmode=disable"}
Description: Registers the User.
Usage:
gator register <username>
Description: Loging into the user account.
Usage:
gator login <username>
Description: Adding a feed to the database and folloing the feed(current user).
Usage:
gator addfeed <feedname> <url>
Description: Follow the feed.
Usage:
gator follow <url>
Description: Scrapeing the feeds the user is following at the interval input. format(10s, 2m, 1h)
Usage:
gator agg <time>
Description: Displays a number of posts scraped by the agg fn by order of newly published and default quantity being 2 if not specified.
Usage:
gator browse <quantity>
Description: Unfollow a feed.
Usage:
gator unfollow <url>
Description: List all the feeds in the database.
Usage:
gator feeds
Description: Lists all the feeds the user is following
Usage:
gator following