
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
rss-braider
Advanced tools
Braid/aggregate/combine RSS feeds into a single RSS (or JSON) document. Optionally process through specified plugins.
Braid/aggregate one or more RSS feeds (file or url) into a single feed (RSS or JSON output). Process resulting feed through specified plugins. Automatic deduplication
npm install rss-braider
npm install
npm test
$ cd examples
$ node simple.js (combines 3 sources)
$ node use_plugins.js (combines 3 sources and runs a transformation plugin)
var RssBraider = require('rss-braider'),
feeds = {};
// Pull feeds from config files:
// feeds.simple_test_feed = require("./config/feed").feed;
// Or define in-line
feeds.simple_test_feed = {
"feed_name" : "feed",
"default_count" : 1,
"no_cdata_fields" : [], // Don't wrap these fields in CDATA tags
"meta" : {
"title": "NPR Braided Feed",
"description": "This is a test of two NPR"
},
"sources" : [
{
"name" : "NPR Headlines",
"count" : 2,
"feed_url" : "http://www.npr.org/rss/rss.php?id=1001",
},
{
"name" : "NPR Sports",
"count" : 2,
"feed_url" : "http://www.npr.org/rss/rss.php?id=1055"
}
]
};
var braider_options = {
feeds : feeds,
indent : " ",
date_sort_order : "desc", // Newest first
log_level : "debug"
};
var rss_braider = RssBraider.createClient(braider_options);
// Override logging level (debug, info, warn, err, off)
rss_braider.logger.level('off');
// Output braided feed as rss. use 'json' for JSON output.
rss_braider.processFeed('simple_test_feed', 'rss', function(err, data){
if (err) {
return console.log(err);
}
console.log(data);
});
Plugins provide custom manipulation and filtering of RSS items/articles. See examples/plugins
for examples.
A plugin operates by modifying the itemOptions
object or by returning null
which will exclude the item
(article) from the resulting feed (See examples/plugins/filter_out_all_articles.js
).
The itemsOptions
object gets passed to node-rss
to generate the RSS feeds, so read the documentation on that module and its use of custom namespaces. (https://github.com/dylang/node-rss)
This plugin will capitalize the article title for all articles
module.exports = function (item, itemOptions, source) {
if (!item || !itemOptions) {
return;
}
if (itemOptions.title) {
itemOptions.title = itemOptions.title.toUpperCase();
}
return itemOptions;
};
The plugin is registered with the feed in the feed config .js file and are run in order.
var feed = {
"feed_name" : "feed with plugins",
"default_count" : 1,
"plugins" : ['capitalize_title', 'plugin_template'],
...
Changed plugin architecture to allow filtering out of article/items by returning -1
instead of a modified itemsOptions
object. This is a breaking change as it will require existing plugins to return itemsOptions
instead of modifying the reference. See examples/plugins
.
FAQs
Braid/aggregate/combine RSS feeds into a single RSS (or JSON) document. Optionally process through specified plugins.
The npm package rss-braider receives a total of 7 weekly downloads. As such, rss-braider popularity was classified as not popular.
We found that rss-braider demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.