Categorygithub.com/Beesy23/gator
modulepackage
0.0.0-20241030110224-315f6cd26c1c
Repository: https://github.com/beesy23/gator.git
Documentation: pkg.go.dev

# README

Gator

Gator is a CLI blog aggregator.

Installation

This CLI requires Postgres and Go installed to run the program.

Make sure you have the latest Go toolchain installed as well as a local Postgres database. You can then install gator with:

go install ...

Config

Create a .gatorconfig.json file in your home directory with the following structure:

{
  "db_url": "postgres://username:@localhost:5432/database?sslmode=disable"
}

Replace the values with your database connection string.

Usage

Create a new user:

gator register <name>

Add a feed:

gator add feed <feed_name> <url>

Start the aggregator:

gator agg 30s

View the posts:

gator browse [limit]

There are a few other commands you'll need as well:

  • gator login <name> - Log in as a user that already exists
  • gator users - List all users
  • gator feeds - List all feeds
  • gator follow <url> - Follow a feed that already exists in the database
  • gator unfollow <url> - Unfollow a feed that already exists in the database

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.