A CLI tool to aggregate RSS feeds for multiple users.
To run Gator, you will need:
- Go — The Go programming language for building and installing the CLI.
- PostgreSQL — A running Postgres database for storing user and feed data.
Make sure both are installed and properly set up on your machine before proceeding.
Make sure you have the latest Go toolchain installed as well as a local Postgres database.
You can then install gator with:
go install github.com/sabrek15/gator@latestCreate 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.
Create a new user:
gator register <name>Add a feed:
gator addfeed <url>Start the aggregator:
gator agg 30sView 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 -
gator reset- resets the database.
-
Ensure Postgres is running locally before using the CLI.
-
Aggregator interval like 30s can be changed based on your preference (10s, 1m, 5m etc).
-
All commands should be run after setting up the config file.
Contributions are welcome!
If you'd like to contribute to this project:
-
Fork the repository
-
Create a new branch
-
Make your changes
-
Open a Pull Request
Make sure to follow best practices and keep your code clean and well-documented.