This project was a boot.dev Golang course. It's an RSS feed aggregator that is built to:
- Add RSS feeds from across the internet to be collected
- Store the collected posts in a PostgreSQL database
- Follow and unfollow RSS feeds that other users have added
- View summaries of the aggregated posts in the terminal, with a link to the full post
At this time, it doesn not implement user authentication for the database.
To run this project, you will need:
- Go (1.20+) installed
- PostgreSQL (1.13+) installed and running
You can clone this repository down to your local machine and build the binary from source. You can make use of the Makefile using make build in the root of the directory, which will build the binary and place it in the bin/ directory.
Alternatively, you can install the latest version of the gator-cli directly using Go:
go install github.com/opsm0nkey/gator-cli@latestGator relies on a local configuration file that's default built in your home directory at ~/.gatorconfig.json, which contains the configuration strings for both the user value and the database connection string. This file is automatically generated when you run the CLI for the first time, and takes the logged on user's details as the default for both the database connection and logged in user values. You can provide an alternate database connection value by setting the GATOR_DB_URL environment variable, which will override the value in the config file.
login: Use thelogincommand, along with you username (e.g.gator login alice), to set the logged in user value in the config file. This is used to associate feed follows and posts with a specific user.addfeed: Use theaddfeedcommand, along with the name of the feed and the feed URL (e.g.gator addfeed bootdev https://www.boot.dev/blog/index.xml), to add a new feed to be collected.agg: Theaggcommand will aggregate the content of the feeds in the database so that they can be viewed with thebrowsecommand. This is something that would typically be run in the background on a schedule, and is configurable by runninggator agg (1m|1h etc...).browse: Thebrowsecommand will show the aggregated posts in the terminal, along with a link to the original post (e.g.gator browse).feeds: Thefeedscommand will show the feeds that have been added to the database, along with the feed details (e.g.gator feeds).following: Thefollowingcommand will show the feeds that the logged in user is following (e.g.gator following).follow: If used in a multi-user environment, you can use thefollowcommand, along with the feed url (e.g.gator follow https://www.boot.dev/blog/index.xml), to follow a specific feed.