A command-line RSS feed aggregator built in Go that allows users to manage RSS feeds and fetch blog posts from various sources.
- User Management: Register, login, and manage multiple users
- RSS Feed Parsing: Fetch and parse RSS feeds from any URL
- Database Storage: PostgreSQL database for persistent user data
- Configuration Management: JSON-based configuration with user sessions
- CLI Interface: Simple command-line interface for all operations
- Go 1.24.4 or later
- PostgreSQL database
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/frontendninja10/blog-aggregator/cmd/gator@latestSet up your PostgreSQL database and create a configuration file:
# Create configuration file in your home directory
echo '{"db_url": "postgres://username:password@localhost/dbname?sslmode=disable"}' > ~/.gatorconfig.jsonReplace username, password, and dbname with your PostgreSQL credentials and database name.
The application provides several commands for managing users and RSS feeds:
Create a new user:
gator register <username>Add a feed:
gator addfeed <feed_name> <feed_url>Start aggregating feeds:
gator aggregate <time_between_requests>Time between requests is in the format of 1s, 1m, 1h, etc.
View the posts:
gator browse [limit]Other commands you might need:
gator login <username>: Login as an existing usergator users: List all usersgator reset: Reset the database (deletes all users)gator feeds: List all feedsgator follow <feed_url>: Follow an existing feedgator unfollow <feed_url>: Unfollow an existing feedgator following: List all followed feeds
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is open source. Please check the repository for license details.
-
Database connection errors: Ensure PostgreSQL is running and the connection string in your config file is correct.
-
User already exists: The register command will fail if you try to create a user that already exists.
-
Configuration file not found: Make sure
~/.gatorconfig.jsonexists in your home directory with valid database credentials. -
RSS feed parsing errors: Some feeds may have non-standard formats. The application includes HTML unescaping for better compatibility.