RSS Aggregator is a command-line interface (CLI) for aggregating RSS feeds. It allows you to register as a user, add feeds, follow and unfollow feeds, and browse the latest posts from your followed feeds.
To run this program, you need to have the following installed:
To install the rss_aggregator CLI, run the following command:
go install github.com/dothedada/rss_aggregatorThis will install the rss_aggregator binary in your Go bin directory.
Before running the program, you need to set up the configuration file.
- Create a file named
.rss_aggregator.jsonin your home directory. - Add the following content to the file:
{
"db_url": "YOUR_POSTGRES_CONNECTION_STRING"
}Replace "YOUR_POSTGRES_CONNECTION_STRING" with your actual PostgreSQL connection string. For example:
{
"db_url": "postgres://user:password@localhost:5432/rss_aggregator?sslmode=disable"
}Once you have installed and configured the program, you can run it from the command line.
Here are some of the available commands:
register <username> <password>: Register a new user.login <username> <password>: Log in as a user.addfeed <name> <url>: Add a new RSS feed.follow <url>: Follow a feed.following: List the feeds you are currently following.browse: Browse the latest posts from your followed feeds.unfollow <url>: Unfollow a feed.users: List all registered users.feeds: List all available feeds.agg <duration>: Periodically scrapes feeds. e.g.,agg 1m.
# Register a new user
rss_aggregator register myuser mypassword
# Log in
rss_aggregator login myuser mypassword
# Add a new feed
rss_aggregator addfeed "Bla bla bla" https://some-shit.dev/rss.xml
# Follow a feed
rss_aggregator follow https://some-shit.dev/rss.xml
# List followed feeds
rss_aggregator following
# Browse posts
rss_aggregator browse