Skip to content
This repository has been archived by the owner on Mar 22, 2019. It is now read-only.

hail2u/node-feedmix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FeedMix

Merge RSS 2.0 feed(s) into a feed.

INSTALL

$ npm install feedmix

USAGE

var feedmix = require('feedmix');
var fs = require('fs');

var a = fs.readFileSync('a.rss', utf8');
var b = fs.readFileSync('b.rss', utf8');
var c = fs.readFileSync('c.rss', utf8');
var m = feedmix.merge([a, b, c], {
  trim: true
});
// do something with `m`
console.log(feedmix.stringify(m, {
  xmldec: {
    version: '1.0',
    encoding: 'UTF-8'
  }
}));

This merges b.rss and c.rss into a.rss. All items are sorted, and lastBuildDate element will be updated.

Also, You can pass xml2js’s parser options to merge() and builder options to stringify().

LICENSE

MIT: http://hail2u.mit-license.org/2015