rss-monitor
RSS Monitor
Track RSS and Atom feeds for new content.
Installation
npm install feedparser
Quick Start
Basic Feed Fetch
const { fetchFeed } = require('./rss-monitor');
const items = await fetchFeed('https://example.com/feed.xml');
console.log(items); // Array of feed items
Track Multiple Feeds
const { trackFeeds } = require('./rss-monitor');
const feeds = [
{ url: 'https://blog1.com/rss', name: 'Blog 1' },
{ url: 'https://blog2.com/atom.xml', name: 'Blog 2' }
];
const results = await trackFeeds(feeds);
console.log(results);
Check for New Items
const { checkForNewItems } = require('./rss-monitor');
const lastCheck = new Date('2024-01-01T00:00:00Z');
const newItems = await checkForNewItems('https://example.com/feed.xml', lastCheck);
console.log(`Found ${newItems.length} new items`);
Common Operations
Fetch Latest Items
const items = await fetchFeed('https://xkcd.com/atom.xml', { limit: 10 });
Get Feed Metadata
const feed = await fetchFeedMetadata('https://example.com/feed.xml');
console.log(feed.title, feed.link, feed.description);
Parse Feed with Options
const items = await fetchFeed('https://example.com/feed.xml', {
limit: 20,
includeContent: false,
timeout: 5000
});
Compare with Previous Check
const newItems = await checkForNewItems(
'https://example.com/feed.xml',
lastCheckDate,
{ limit: 50 }
);
Output Format
Each feed item contains:
title- Item titlelink- Item URLdescription- Item summary/descriptionpubDate- Publication date (ISO string)author- Author name (if available)content- Full content (if available and includeContent: true)categories- Tags/categoriesenclosures- Media attachments (images, audio, video)
Examples
RSS Feed Reader
const rssMonitor = require('./rss-monitor');
async function readFeeds() {
const feeds = [
'https://xkcd.com/atom.xml',
'https://blog.github.com/feed/',
'https://news.ycombinator.com/rss'
];
for (const feedUrl of feeds) {
try {
const items = await rssMonitor.fetchFeed(feedUrl, { limit: 5 });
console.log(`\n📰 ${feedUrl}`);
items.forEach(item => {
console.log(` • ${item.title}`);
console.log(` ${item.link}`);
});
} catch (err) {
console.error(`Failed to fetch ${feedUrl}:`, err.message);
}
}
}
Monitor for New Content
const rssMonitor = require('./rss-monitor');
const fs = require('fs').promises;
const STATE_FILE = './last-check.json';
async function monitorFeeds() {
// Load last check times
let lastChecks = {};
try {
lastChecks = JSON.parse(await fs.readFile(STATE_FILE, 'utf8'));
} catch (e) {
// No state file yet
}
const feeds = [
{ url: 'https://xkcd.com/atom.xml', name: 'XKCD' },
{ url: 'https://blog.github.com/feed/', name: 'GitHub Blog' }
];
for (const feed of feeds) {
const lastCheck = lastChecks[feed.url] ? new Date(lastChecks[feed.url]) : null;
const newItems = await rssMonitor.checkForNewItems(feed.url, lastCheck);
if (newItems.length > 0) {
console.log(`\n🆕 ${feed.name}: ${newItems.length} new items`);
newItems.forEach(item => {
console.log(` • ${item.title}`);
});
}
lastChecks[feed.url] = new Date().toISOString();
}
await fs.writeFile(STATE_FILE, JSON.stringify(lastChecks, null, 2));
}
Notes
- Supports both RSS 2.0 and Atom 1.0 formats
- Automatically detects feed format
- Handles redirects and common feed variations
- Default timeout: 10 seconds
- Items sorted by publication date (newest first)
More from winsorllc/upgraded-carnival
vector-memory
Vector-based semantic memory using embeddings for intelligent recall. Store and search memories by meaning rather than keywords. Use when you need semantic search, similar document retrieval, or context-aware memory.
130model-router
Route requests between different LLM providers and models. Configure routing rules, fallback providers, and model-specific parameters inspired by ZeroClaw and OpenClaw model routing systems.
61rss-reader
Read and parse RSS/Atom feeds. Use when: user wants to subscribe to feeds, get latest articles, or monitor news sources.
54video-frames
Production-grade video frame extraction with thumbnail grids, GIF creation, and batch frame processing. Includes intelligent quality presets, progress tracking, and comprehensive error handling.
39elevenlabs-tts
Convert text to speech using ElevenLabs API. Use when you need to generate voice audio for messages, narrations, or accessibility.
25skill-autoinstaller
Automatically discover, evaluate, validate, and install new PopeBot skills from GitHub repositories. Combines ZeroClaw's security auditing with OpenClaw's CLI-based skill approach.
22