diff --git a/bored.js b/bored.js index e363c24..ccb5c9d 100644 --- a/bored.js +++ b/bored.js @@ -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!"); + });*/ }); - -