updated bored

This commit is contained in:
Martin Donnelly 2016-07-05 11:16:36 +01:00
parent 7a5a1de3e3
commit 4cc37c8067

View File

@ -1,4 +1,4 @@
var outputFile = 'paleo',
var outputFile = 'bored',
RssBraider = require('rss-braider'),
fs = require('fs'),
ejs = require('ejs'),
@ -42,7 +42,7 @@ var rss_braider = RssBraider.createClient(braider_options);
// Override logging level (debug, info, warn, err, 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) {
return console.log(err);
}
@ -50,16 +50,7 @@ rss_braider.processFeed('simple_test_feed', 'json', function (err, data) {
var j = JSON.parse(data);
var ejsOutput = ejs.compile(str)(j);
fs.writeFile(__dirname + "/dist/" + outputFile + ".html", ejsOutput, function (err) {
if (err) {
return console.log(err);
}
console.log("The file was saved!");
});
fs.writeFile(__dirname + "/dist/" + outputFile + ".json", data, function (err) {
fs.writeFile(__dirname + "/dist/" + outputFile + ".json", data, function(err) {
if (err) {
return console.log(err);
}
@ -67,6 +58,12 @@ rss_braider.processFeed('simple_test_feed', 'json', function (err, data) {
console.log("The file was saved!");
});
/*fs.writeFile(__dirname + "/html/" + outputFile + ".html", ejsOutput, function (err) {
if (err) {
return console.log(err);
}
console.log("The file was saved!");
});*/
});