rss-braider/README.md

43 lines
1.0 KiB
Markdown
Raw Normal View History

2015-02-11 02:54:25 +00:00
[![Build Status](https://travis-ci.org/KQED/rss-braider.svg?branch=master)](https://travis-ci.org/KQED/rss-braider)
2015-02-13 03:44:33 +00:00
## Summary
Braid/aggregate one or more RSS feeds (file or url) into a single feed (RSS or JSON output). Process resulting feed through specified plugins.
2015-02-13 03:44:33 +00:00
## Installation
```
npm install rss-braider
2015-02-13 03:44:33 +00:00
```
## Test
`npm test`
## Examples
```
$ cd examples
2015-05-29 01:01:47 +00:00
$ node simple.js (combines 3 sources)
$ node plugins.js (combines 3 sources and runs a transformation plugin)
2015-02-13 03:44:33 +00:00
```
2015-05-29 01:01:47 +00:00
## Code Example
```js
var RssBraider = require('rss-braider'),
feed_obj = {};
// Build feed options
feed_obj.filefeed = require("./config/feed").feed;
var braider_options = {
feeds : feed_obj,
indent : " ",
date_sort_order : "desc" // Newest first
};
var rss_braider = RssBraider.createClient(braider_options);
// braid 'filefeed' sources together and output in RSS format
rss_braider.processFeed('filefeed', 'rss', function(err, data){
if (err) {
return console.log(err);
}
console.log(data);
});
```
2015-02-13 03:44:33 +00:00