This is RSS feed aggregator in Go!
- Add RSS feeds from across the internet to be collected.
- Store the collected posts in PostgreSQL databse.
- Follow and unfollow RSS feeds other users have added.
For this CLI tool to work you will have to install GO(obviously..😜)
You will need to install Go(version 1.23+), you can follow this [installation instruction ]
-
If you're getting a "command not found" error after following installation, it's most likely because the directory containing the
goprogram isn't in youtPATH. You need to add the directory to yourPATHby modifying your shell's configuration file. First, you need to know where thegocommand was installed. It might be in: -
/usr/local/go/bin(official installation) -
Somewhere else?
You can ensure it exists by attempting to run go using its full filepath. For example, if you think it's in ~/.local/opt/go/bin, you can run ~/.local/opt/go/bin/go version. If that works, then you just need to add ~/.local/opt/go/bin to your PATH and reload your shell:
# For Linux/WSL
echo 'export PATH=$PATH:$HOME/.local/opt/go/bin' >> ~/.bashrc
# next, reload your shell configuration
source ~/.bashrc
Use can install the gator by using go install command:
go install github.com/Vikuuu/gatorGator is a multi-user CLI application. There's no server(other than the database), so it's only intended for local user.
- Create file
~/.gatorconfig.jsonin your root directory, and add the following:
{
"db_url": "postgres://postgres:postgres@localhost:5432/gator",
}For this you should have PostgreSQL installed.
Note
You will have to create the database gator manually. Steps are shown here
- Linux/WSL(Debian):
sudo apt update
sudo apt install postgresql postgresql-contrib- Ensure it is installed by running the following command:
psql --version- Update postgres password(Linux only):
sudo passwd postgresYou can add the postgres as password so that you won't forget.
- Start the Postgres server in the background
- Linux:
sudo service postgresql start
- Connect to the server, simply using
psqlclient
- Linux:
sudo -u postgres psql
You should see a new prompt that looks like this:
postgres=#- Now create the
gatordatabase in your postgresql
postgres=# CREATE DATABASE gator;- You can move to your database by using:
postgres=# \c gator- Check the table in the gator database.
postgres=# \dt- You can register a user by following command:
gator register <name>- You can login a user by following command:
gator login <username>- You can add feeds by following command:
gator addfeed <feedName> <feedURL>You can run the command help to get the information on all the available commands:
gator help