A command-line RSS feed aggregator that allows you to follow RSS feeds, aggregate posts, and browse content from your terminal.
Before you begin, ensure you have the following installed on your system:
- Node.js (version 14.0 or higher)
- npm (comes with Node.js)
- PostgreSQL (version 12.0 or higher)
- Git (for version control)
-
Install NVM (Node Version Manager):
# Visit NVM for the latest updates curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
-
Restart your terminal or run:
source ~/.bashrc
-
Install and use the required Node.js version:
nvm install node nvm use node
brew install postgresql@15
brew services start postgresql@15
sudo apt update
sudo apt install postgresql postgresql-contrib
sudo systemctl start postgresql
sudo systemctl enable postgresql
Download and install from PostgreSQL official website
-
Create a database user and database:
sudo -u postgres psql
-
In the PostgreSQL prompt:
CREATE USER gator_user WITH PASSWORD 'your_password'; -- You have to use only one ' for this command. CREATE DATABASE gator_db OWNER gator_user; GRANT ALL PRIVILEGES ON DATABASE gator_db TO gator_user; \c gator_db -- To exit you can use the following: \q
-
Clone the repository:
git clone https://github.com/ahm4dd/RSSgator.git cd RSSgator
-
Install dependencies:
npm install
-
Set up your Node.js version (if using NVM):
nvm use
Create a configuration file in your home directory:
touch ~/.gatorconfig.json
Add the following configuration:
{
"db_url": "postgres://gator_user:your_password@localhost:5432/gator_db",
"current_user_name": "your_username"
}
Option | Type | Description | Required |
---|---|---|---|
db_url |
string | PostgreSQL connection string | Yes |
current_user_name |
string | Your username for the application | Yes |
For running it for the first time you have to run the following command:
npm start run register (your_user_name)
Run commands using npm:
npm start run [command] [arguments]
Register a new user account.
npm start run register
Login to your account.
npm start run login
List all registered users.
npm start run users
List all available RSS feeds.
npm start run feeds
Add a new RSS feed to the system.
npm start run addfeed "Feed Name" "https://example.com/rss"
Follow an RSS feed.
npm start run follow "https://example.com/rss"
Unfollow an RSS feed.
npm start run unfollow "https://example.com/rss"
List all feeds you're currently following.
npm start run following
Start the RSS feed aggregation process. Requires a time interval argument.
npm start run agg "30s" # Every 30 seconds
npm start run agg "5m" # Every 5 minutes
npm start run agg "1h" # Every hour
npm start run agg "2.5h" # Every 2.5 hours
Browse aggregated posts from your followed feeds.
npm start run browse # Browse 2 posts only
npm start run browse 10 # Browse latest 10 posts
npm start run reset
Here are some common usage workflows:
# 1. Register and login
npm start run register
npm start run login
# 2. Add and follow RSS feeds
npm start run addfeed "Tech Crunch" "https://techcrunch.com/rss"
npm start run follow "https://techcrunch.com/rss"
# 3. Start aggregating content every 30 minutes
npm start run agg "30m"
# 4. Browse the latest 5 posts
npm start run browse 5
# 5. Check what feeds you're following
npm start run following
# 6. View all users and feeds
npm start run users
npm start run feeds
You can also use environment variables for configuration:
export GATOR_DB_URL="postgres://gator_user:password@localhost:5432/gator_db"
export GATOR_CURRENT_USER_NAME="your_username"
Database connection errors
- Verify PostgreSQL is running:
sudo systemctl status postgresql
- Check your connection string in the config file
- Ensure the database and user exist
- Test connection:
psql -U gator_user -d gator_db -h localhost
Command not found errors
- Ensure you're in the project directory
- Run
npm install
to install dependencies - Check if you're using the correct Node.js version with
nvm use
Permission errors
- Make sure your PostgreSQL user has the correct permissions
- Check file permissions for the config file:
chmod 600 ~/.gatorconfig.json
RSS feed errors
- Verify the RSS feed URL is accessible
- Check if the feed URL returns valid XML/RSS content
- Some feeds may require user-agent headers or have rate limiting
Enable debug logging:
DEBUG=gator* npm start run [command]
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Make your changes and add tests
- Run the test suite:
npm test
- Commit your changes:
git commit -am 'Add new feature'
- Push to the branch:
git push origin feature-name
- Submit a pull request
# Install dependencies
npm install
# Set up your Node.js version
nvm use
# Run tests (There are no tests yet)
npm test
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Documentation: This README