Updates for feeds

This commit is contained in:
martind2000 2016-01-22 16:35:47 +00:00
parent df7669f1d3
commit 7703b06f10
2 changed files with 26 additions and 10 deletions

View File

@ -19,7 +19,7 @@ feeds.simple_test_feed = {
"description": "Combined Lifestyle Feed", "description": "Combined Lifestyle Feed",
'site_url': 'http://pipes.silvrtree.co.uk/lifestyle.xml' 'site_url': 'http://pipes.silvrtree.co.uk/lifestyle.xml'
}, },
"plugins": ['filter_3_days', 'fix_images', 'fix_scripts'], "plugins": ['filter_last_week', 'fix_images', 'fix_scripts'],
"sources": [{ "sources": [{
"count": 100, "count": 100,
@ -121,11 +121,7 @@ feeds.simple_test_feed = {
"count": 100, "count": 100,
"feed_url": "http://www.hodinkee.com/blog/rss.xml" "feed_url": "http://www.hodinkee.com/blog/rss.xml"
}, { }, {
"count": 100,
"feed_url": "http://www.gq-magazine.co.uk/RSS"
}, {
"count": 100, "count": 100,
"feed_url": "http://feeds.feedburner.com/firstinwatches" "feed_url": "http://feeds.feedburner.com/firstinwatches"
@ -156,7 +152,23 @@ feeds.simple_test_feed = {
}, { }, {
"count": 100, "count": 100,
"feed_url": "http://fourpins.com/feed/" "feed_url": "http://www.gentlemansgazette.com/feed/"
}, {
"count": 100,
"feed_url": "http://feeds.feedburner.com/wellspent"
}, {
"count": 100,
"feed_url": "http://hespokestyle.com/feed/"
}, {
"count": 100,
"feed_url": "http://effortlessgent.com/feed/"
}, {
"count": 100,
"feed_url": "https://feeds.feedburner.com/thisfits"
} }
] ]
}; };
@ -173,7 +185,7 @@ var rss_braider = RssBraider.createClient(braider_options);
// Override logging level (debug, info, warn, err, off) // Override logging level (debug, info, warn, err, off)
rss_braider.logger.level('off'); rss_braider.logger.level('off');
rss_braider.processFeed('simple_test_feed', 'json', function(err, data) { rss_braider.processFeed('simple_test_feed', 'json', function (err, data) {
if (err) { if (err) {
return console.log(err); return console.log(err);
} }
@ -181,7 +193,7 @@ rss_braider.processFeed('simple_test_feed', 'json', function(err, data) {
var j = JSON.parse(data); var j = JSON.parse(data);
var ejsOutput = ejs.compile(str)(j); var ejsOutput = ejs.compile(str)(j);
fs.writeFile(__dirname + "/html/" + outputFile + ".json", data, function(err) { fs.writeFile(__dirname + "/html/" + outputFile + ".json", data, function (err) {
if (err) { if (err) {
return console.log(err); return console.log(err);
} }
@ -189,7 +201,7 @@ rss_braider.processFeed('simple_test_feed', 'json', function(err, data) {
console.log("The file was saved!"); console.log("The file was saved!");
}); });
fs.writeFile(__dirname + "/html/" + outputFile + ".html", ejsOutput, function(err) { fs.writeFile(__dirname + "/html/" + outputFile + ".html", ejsOutput, function (err) {
if (err) { if (err) {
return console.log(err); return console.log(err);

View File

@ -53,6 +53,10 @@ feeds.simple_test_feed = {
/* "name" : "JobServe",*/ /* "name" : "JobServe",*/
"count": 100, "count": 100,
"feed_url": "http://civilizedcavemancooking.com/feed/" "feed_url": "http://civilizedcavemancooking.com/feed/"
}, {
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.ruled.me/feed/"
}] }]
}; };
var braider_options = { var braider_options = {